Selection.InsertDateTime Method
Inserts the current date or time, or both, either as text or as a TIME field.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Sub InsertDateTime ( _
ByRef DateTimeFormat As Object, _
ByRef InsertAsField As Object, _
ByRef InsertAsFullWidth As Object, _
ByRef DateLanguage As Object, _
ByRef CalendarType As Object _
)
'Usage
Dim instance As Selection
Dim DateTimeFormat As Object
Dim InsertAsField As Object
Dim InsertAsFullWidth As Object
Dim DateLanguage As Object
Dim CalendarType As Object
instance.InsertDateTime(DateTimeFormat, _
InsertAsField, InsertAsFullWidth, _
DateLanguage, CalendarType)
void InsertDateTime(
ref Object DateTimeFormat,
ref Object InsertAsField,
ref Object InsertAsFullWidth,
ref Object DateLanguage,
ref Object CalendarType
)
Parameters
- DateTimeFormat
Type: System.Object%
Optional Object. 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
Type: System.Object%
Optional Object. True to insert the specified information as a TIME field. The default value is True.
- InsertAsFullWidth
Type: System.Object%
Optional Object. 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’ve selected or installed.
- DateLanguage
Type: System.Object%
Optional Object. Sets the language in which to display the date or time.
Can be either of the following WdDateLanguage constants: wdDateLanguageBidi or wdDateLanguageLatin. This argument may not be available to you, depending on the language support (U.S. English, for example) that you’ve selected or installed.
- CalendarType
Type: System.Object%
Optional Object. Sets the calendar type to use when displaying the date or time.
Can be either of the following WdCalendarTypeBi constants: wdCalendarTypeBidi or wdCalendarTypeGregorian. This argument may not be available to you, depending on the language support (U.S. English, for example) that you’ve selected or installed.