Selection.InsertDateTime (Word)

Inserts the current date or time, or both, either as text or as a TIME field.

Using this method replaces the current selection. To avoid this, use the Collapse method before using this method.

InsertDateTime (DateTimeFormat, InsertAsField, InsertAsFullWidth, DateLanguage, CalendarType)


Selection.InsertDateTime DateTimeFormat:="MMMM dd, yyyy", _ 
 InsertAsField:=True

Arguments

Optional arguments

The following arguments are optional

DateTimeFormat (String) - The format to be used for displaying the date or time, or both. If this argument is omitted, Microsoft Word uses the short-date style from the Windows Control Panel (Regional Settings icon).

InsertAsField (Boolean) - True to insert the specified information as a TIME field. The default value is True.

InsertAsFullWidth (Boolean) - True to insert the specified information as double-byte digits. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

DateLanguage (WdDateLanguage) - Sets the language in which to display the date or time. Can be either of the WdDateLanguage constants. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

Possible return values are wdDateLanguageBidi - Bidirectional date/time format, wdDateLanguageLatin - Latin date/time format.

CalendarType (WdCalendarTypeBi) - Sets the calendar type to use when displaying the date or time. Can be either of the WdCalendarTypeBi constants. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

Possible return values are wdCalendarTypeBidi - Bi-directional calendar, wdCalendarTypeGregorian - Gregorian calendar.