Microsoft KB Archive/134910

= WD: How to Set a Default DATE Field Format in Word =

Article ID: 134910

Article Last Modified on 8/17/2007

-

APPLIES TO


 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q134910





IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



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.



Change 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:  On the Windows Start menu, point to Settings, and then click Control Panel. In the Control Panel dialog box, double-click Regional Settings. In the Regional Settings Properties dialog box, click to select 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.</ol>

For the new settings to take effect, you must quit and restart all instances of Word, including Microsoft Outlook if you are using Word as your e-mail editor.

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.

Change 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.

To Use the RegOptions Macro
In Word 97:

NOTE: The RegOptions macro is located in the the Support8.dot template file. To access this macro, follow these steps: <ol> On the Tools menu, click Templates and Add-ins, and click Add.</li> Click to select the Support8.dot template and click OK.

NOTE: The default location for the Support8.dot template is in the following folder:

C:\Program Files\Microsoft Office\Office\Macros

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 will need to install it.For additional information about how to add this component, click the article number below to view the article in the Microsoft Knowledge Base:

120802 Office: How to Add/Remove a Single Office Program or Component

</li> On the Tools menu, point to Macro, and then click Macros.</li> In the Macros available in list, click to select Support8.dot (Global Template).</li> Under Macro name, click to select RegOptions, and then click Run.</li> Click the Word 8.0 Options tab, and under Options, click to select DateFormat.</li> Under Setting, type in the desired date format, and click OK.</li></ol>

In Microsoft Word for Windows 95:

NOTE: The RegOptions macro is located in the Macros7.dot template. <ol> On the File menu, click Templates, and then click Add.</li> Change to the Macros folder listed under Winword (for example, C:\Msoffice\Winword\Macros). Click to select the Macros7.dot file and click OK.

This step adds the Macros7 template to the Global Templates and Add-ins box and then 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.For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

120802 Office: How to Add/Remove a Single Office Program or Component

</li> On the Tools menu, click Macro. In the Macros available in list, click Macros7.dot (Global Template). In the Macro name list, click to select RegOptions, and then click Run.</li> In the Microsoft Word Registry Options dialog box, select the Section line for Word 7.0 Options. Change the Option line to DateFormat.</li> On the Setting line, type the format of the DATE field you want, click Change, and then click OK.

NOTE: For more information about date formats, please see the Date Format Table in the "References" section later in this article.</li></ol>

To Use The Windows Registry Editor
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

<ol> Quit Word.</li> On the Windows Start menu, click Run.</li> In the Open box, type regedit, and then click OK.</li>  Locate the appropriate registry entry for your version of Microsoft Word.

For Microsoft Word 97 for Windows: <pre class="fixed_text">HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Word\Options For Microsoft Word for Windows 95: <pre class="fixed_text">HKEY_CURRENT_USER\Software\Microsoft\Word\7.0\Options </li> <li>With the Options key selected, click New on the Edit menu, and then click String Value. Type DateFormat and press ENTER.</li> <li>Under Name (on the right side of the Registry Editor) click to select the DateFormat entry you just created. On the Edit menu, click Modify. On the Value Data line, type the desired date format.

NOTE: For more information about date formats, please see the Date Format Table in the "References" section later in this article.</li> <li>Quit the Registry Editor and start Word.</li></ol>

<div class="references_section">

Date Format Table
<pre class="fixed_text">  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: kbfield kbinfo kbusage KB134910

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.