ContentControl.DateStorageFormat (Word)

Returns or sets a WdContentControlDateStorageFormat that represents the format for storage and retrieval of dates when a date content control is bound to the XML data store of the active document. Possible return values are wdContentControlDateStorageDate - Specifies to store or retrieve the date value for a date content control as a date in the standard XML Schema DateTime format, wdContentControlDateStorageDateTime - Specifies to store or retrieve the date value for a date content control as a time in the standard XML Schema DateTime format, wdContentControlDateStorageText - Specifies to store or retrieve the date value for a date content control as text.

The DateStorageFormat property allows you to store dates in date format, date/time format, or text format.


Dim objCC As ContentControl 
 
Set objCC = ActiveDocument.ContentControls.Add(wdContentControlDate) 
 
objCC.Title = "Review Period End Date" 
objCC.DateDisplayFormat = "MMMM d, yyyy" 
objCC.DateStorageFormat = wdContentControlDateStorageDate 
objCC.Range.Text = "January 1, 2007"