Share via


ContentControl.DateStorageFormat Property

Definition

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

public:
 property Microsoft::Office::Interop::Word::WdContentControlDateStorageFormat DateStorageFormat { Microsoft::Office::Interop::Word::WdContentControlDateStorageFormat get(); void set(Microsoft::Office::Interop::Word::WdContentControlDateStorageFormat value); };
public Microsoft.Office.Interop.Word.WdContentControlDateStorageFormat DateStorageFormat { get; set; }
member this.DateStorageFormat : Microsoft.Office.Interop.Word.WdContentControlDateStorageFormat with get, set
Public Property DateStorageFormat As WdContentControlDateStorageFormat

Property Value

The format in which dates are saved in a custom XML part. The default is wdContentControlDateStorageDateTime.

Exceptions

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.

Applies to