Syntax
InsertDateTime [.DateTimePic = text] [, .InsertAsField = number]
Remarks
Inserts the current date, time, or both, as either text or a TIME field.
Argument | Explanation |
.DateTimePic | A string describing the format used for displaying the date, time, or both. If omitted, Word uses the format specified by the "DateFormat=" line in the [Microsoft Word] section of WINWORD6.INI (Windows 3.x), Word Settings (6) (Macintosh), or the registry (Windows 95 and Windows NT). In Windows 3.x, if there is no "DateFormat=" line, Word uses the "sShortDate" setting in the [intl] section of WIN.INI. |
.InsertAsField | Specifies whether Word inserts the information as a TIME field: 0 (zero) Word inserts the information as text. 1 Word inserts the information as a TIME field. Omitted Word inserts the information according to the current setting of the Insert As Field check box in the Date And Time dialog box (Insert menu). |
Example
This example inserts a TIME field for the current date in the form "3 September, 1993":
InsertDateTime .InsertAsField = 1, .DateTimePic = "d MMMM, yyyy"
See Also
InsertDateField, InsertField, InsertPageField