ContentControl.DateStorageFormat 屬性

定義

取得或設定儲存在自訂 XML 組件中的日期,由代表日期選擇器的 ContentControl 儲存時所用的格式。

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

屬性值

自訂 XML 組件中儲存的日期格式。 預設值為 wdContentControlDateStorageDateTime。

例外狀況

屬性Type沒有 Microsoft.Office.Interop.Word 值。WdContentControlType.wdContentControlDate。

備註

只有當 表示日期選擇器時 ContentControl ,才能使用這個屬性。

ContentControl如果 系結至檔中的自定義 XML 元件,屬性DateStorageFormat會指定控件如何將日期儲存在 XML 中。 您可以將日期儲存為 XML 架構日期 (xsd:date) 、XML 架構日期/時間 () xsd:dateTime 或文字。

如需將內容控件系結至自定義 XML 元件的詳細資訊,請參閱 內容控件自定義 XML 元件概觀

適用於