Edit

Share via


Word.SelectionInsertDateTimeOptions interface

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the options for the Selection.insertDateTime method.

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

Properties

calendarType

If provided, specifies the calendar type to use when displaying the date or time. This property may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

dateLanguage

If provided, specifies the language in which to display the date or time. This property may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

dateTimeFormat

If provided, specifies the format to be used for displaying the date or time, or both. If this property is omitted, Microsoft Word uses the short-date style from the Windows Control Panel (Regional Settings icon). See Date/Time data type for format symbols.

insertAsField

If provided, specifies whether to insert the specified information as a TIME field. The default value is true.

insertAsFullWidth

If provided, specifies whether to insert the specified information as full-width (double-byte) digits. This property may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

Property Details

calendarType

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies the calendar type to use when displaying the date or time. This property may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

calendarType?: Word.CalendarTypeBidirectional | "Gregorian" | "Bidirectional";

Property Value

Word.CalendarTypeBidirectional | "Gregorian" | "Bidirectional"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

dateLanguage

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies the language in which to display the date or time. This property may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

dateLanguage?: Word.DateLanguage | "Bidirectional" | "Latin";

Property Value

Word.DateLanguage | "Bidirectional" | "Latin"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

dateTimeFormat

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies the format to be used for displaying the date or time, or both. If this property is omitted, Microsoft Word uses the short-date style from the Windows Control Panel (Regional Settings icon). See Date/Time data type for format symbols.

dateTimeFormat?: string;

Property Value

string

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

insertAsField

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies whether to insert the specified information as a TIME field. The default value is true.

insertAsField?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

insertAsFullWidth

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies whether to insert the specified information as full-width (double-byte) digits. This property may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

insertAsFullWidth?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]