ID: Q176692
The information in this article applies to:
In Word, you can insert a date using the DATE field. You can add switches to the DATE field to customize the date format.
This article describes the following:
To insert a date and add switches to control the date format, follow these steps:
1. On the Insert menu, click Field. Under Categories, click the Date and
Time. Under Field Names, click Date, and then click Options.
2. Click the General Switches tab and under Date-Time, select a date
format, click Add to Field, and then click OK twice.
In the following example, the date field code
DATE \@ "dd MMMM yyyy"
returns:
12 July 1997
The "dd" switch returns "12," the "MMMM" switch returns the month
July, and "yyyy" returns the year 1997.
To store the date field as an AutoText entry, follow these steps:
1. In your document, select the date field that you inserted using the
steps in the previous section.
2. On the Insert menu, point to AutoText, and then click New.
3. Type a name for the AutoText Entry and then click OK.
To record an "insert date" macro and assign it to a toolbar button, follow these steps:
1. On the Tools menu, point to Macro, and then click Record New Macro.
2. Under Macro Name, type in a name for your macro and then click Toolbars.
3. Drag your macro to a toolbar and then click Close to close the Customize
dialog box.
4. On the Insert menu, click Field. Under Categories, click Date And Time.
Under Field Names, click Date, and then click Options.
5. Click the General Switches tab and under Date-Time, select a date
format, click Add To Field, and then click OK twice.
6. Click Stop Recording on the macro toolbar.
For more information about date field format switches, click the Office Assistant, type "switches," click Search, click "general switches", click Date-Time Picture, and then click Date Instructions.
NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Word Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q120802
TITLE : Office: How to Add/Remove a Single Office
Program or Component
For additional information, please see the following article in the
Microsoft Knowledge Base:
ARTICLE-ID: Q160988
TITLE : WD97: How to Create Ordinal (Legal) Dates in Form Fields
ARTICLE-ID: Q134910
TITLE : WD: How to Set a Default Date Field Format in Word
For additional information about this situation in earlier versions of
Word, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q59019
TITLE : WD: Creating Custom Date Formats with Glossary or AutoMac
Additional query words: Additional query words: word97 word8
Keywords : kbfield macword98
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: February 13, 1999