WD: How to Set a Default DATE Field Format in Word
ID: Q134910
|
The information in this article applies to:
-
Microsoft Word for Windows 95, versions 7.0, 7.0a
-
Microsoft Word 97 for Windows
-
Microsoft Office 97 for Windows
-
Microsoft Windows 95
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help
topic in Regedt32.exe.
SUMMARY
This article describes how to change the default DATE field format in
Word. There are two ways to insert DATE fields. The way to change the
default setting depends on how you insert the field.
MORE INFORMATIONCHANGING THE DEFAULT THAT APPEARS WHEN YOU CLICK DATE AND TIME ON THE INSERT MENU
To change the default date that appears when you click Date And Time on the
Insert menu, modify the date in the Regional Settings control panel. To do
this, follow these steps:
- Click Start, point to Settings, and then click Control Panel.
- In the Control Panel, double-click the Regional Settings icon.
- In the Regional Settings Properties dialog box, click the Date tab.
- Under the Short Date Style, select the date format that you want.
NOTE: If you type an invalid character in either the Short Date
Style or the Long Date Style box, you will receive the following
error message:
One or more of the characters you typed for the Short Date (Long
Date) style are invalid. Try typing different characters.
In this case, you will have to retype the date style from step 4.
- Click Apply, and then click OK.
For the new settings to take effect, you must quit and restart all
instances of Word, including WordMail.
NOTE: If you click the Default button to change the default date format
in the Date and Time dialog box, the default date is NOT changed when you
restart Microsoft Word.
CHANGING THE DEFAULT THAT APPEARS WHEN YOU CLICK FIELD ON THE INSERT MENU
When you click Field on the Insert menu and then click Date under Field
names, the default date is determined by a registry setting. You can modify
this registry setting by using the RegOptions macro (this macro comes with
Word) or you can modify it with the Registry Editor.
Using the RegOptions Macro
In Word 97:
In Word 97, the RegOptions is located in the the Support8.dot template
file. To access this macro, follow these steps:
- On the Tools menu, click Templates And Add-ins, and click Add.
- Locate the Support8.dot template. (The default location for this file is
"\Program Files\Microsoft Office\Office\Macros\Support8.dot"). Select
the Support8.dot template and click OK.
The Support8.dot template will be added to the "Global Templates and Add-
ins" box.
NOTE: If the Support8.dot file is not on your computer, you may need to
add that component of Office. For information about how to add this
component of Office 97, please see the following article in the
Microsoft Knowledge Base:
Q120802 Office: How to Add/Remove a Single Office Program or Component
- On the Tools menu, point to Macro, and then click Macros.
- In the Macros Available In list, click Support8.dot (Global Template).
- Under Macro Name, click RegOptions, and then click Run.
- Click the Word 8.0 Options tab, and, under Options, select DateFormat.
- Under Setting, type in the desired date format, and click OK.
In Word 7.x:
In Word 7.x, the RegOptions is located in the Macros7.dot file of Microsoft
Word 7.x
- On the File menu, click Templates, and then click Add.
- Change to the Macros subfolder under Winword (for example,
C:\Msoffice\Winword\Macros). Select the Macros7.dot file and click OK.
This step adds the Macros7 template to the "Global Templates and Add-
ins" box. Click OK.
NOTE: Depending on what type of installation that you did, the
Macros and/or Macros7.dot file may not be found. In this case
you will need to add that component of the program. Please
see the following article in the Microsoft Knowledge Base:
Q120802 Office: How to Add/Remove a Single Office Program or Component
- On the Tools menu, click Macro. In the Macros Available In list, click
Macros7.dot (Global Template). In the Macro Name list, click RegOptions,
and then click Run.
- In the Microsoft Word Registry Options dialog box, select the Section
line for Word 7.0 Options. Change the Option line to DateFormat.
- On the Setting line, type the format of the Date field you want, click
Change, and then click OK. (For more information, see the Date Format
Table later in this article.)
Using Registry Editor
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect use of Registry Editor
can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys and
Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete
Information in the Registry" and "Edit Registry Data" Help topics in
Regedt32.exe. Note that you should back up the registry before you edit it.
If you are running Windows NT, you should also update your Emergency
Repair Disk (ERD).
- Quit Word.
- Click the Start button, and then click Run.
- In the Open box, type regedit, and then
click OK.
- Locate the appropriate registry entry.
For Word 97:
HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Word\Options
For Word 7.0:
HKEY_CURRENT_USER\Software\Microsoft\Word\7.0\Options
- With the Options entry selected, on the Edit menu, click New, and then
click String Value. Type DateFormat and
press ENTER.
- Under Name (on the right side of the Registry Editor) click to select
the DateFormat entry. On the Edit menu, click Modify. On the Value Data
line, type the desired date format. (For more information about date
formats, see the Date Format Table later in this article.)
- Quit the Registry Editor and start Word.
Date Format Table
Setting Date result
----------------------------------------------------------------
MMMM d, yyyy January 2, 1995
MMMM dd, yyyy January 02, 1995
MMM d, yyyy Jan 2, 1995
dddd, MMMM d, yyyy Monday, January 2, 1995
h:mm am/pm dddd, MMMM d 10:00 am Monday, January 2
NOTE: For this date format change to take effect, quit and restart Word.
Press ALT+SHIFT+D to insert the Date field into your document with the new
default date format.
Additional query words:
8.0
Keywords : kbusage kbdta kbfield winword word7 word95
Version : WINDOWS:7.0,7.0a,95,97
Platform : WINDOWS
Issue type : kbinfo
|