共用方式為


ContentControl.DateDisplayFormat Property

Gets or sets a string that specifies the format of dates that are displayed in 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 DateDisplayFormat As String
string DateDisplayFormat { get; set; }

Property Value

Type: System.String
A string that specifies the format in which the ContentControl displays dates.

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.

The default date format is the format setting specified in Microsoft Office Word, which usually depends on the locale setting of the operating system. For example, the default format of dates for the locale English (United States) is mm/dd/yyyy.

.NET Framework Security

See Also

Reference

ContentControl Interface

Microsoft.Office.Tools.Word Namespace