ContentControl.DateStorageFormat Property

Gets or sets the format in which dates are saved in a custom XML part by a ContentControl that represents a date picker.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Syntax

'Declaration
Property DateStorageFormat As WdContentControlDateStorageFormat
WdContentControlDateStorageFormat DateStorageFormat { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.WdContentControlDateStorageFormat
The format in which dates are saved in a custom XML part. The default is wdContentControlDateStorageDateTime.

Exceptions

Exception Condition
COMException

The Type property does not have the value Microsoft.Office.Interop.Word.WdContentControlType.wdContentControlDate.

Remarks

This property can be used only if the ContentControl represents a date picker.

If the ContentControl is bound to a custom XML part in the document, the DateStorageFormat property specifies how the control saves dates in XML. You can persist dates as an XML schema date (xsd:date), an XML schema date/time (xsd:dateTime), or as text.

For more information about binding content controls to custom XML parts, see Content Controls and Custom XML Parts Overview.

.NET Framework Security

See Also

Reference

ContentControl Interface

Microsoft.Office.Tools.Word Namespace

Other Resources

Content Controls

Custom XML Parts Overview