WD6X: Date Toolbar Button Inserts Incorrect Date FormatLast reviewed: February 5, 1998Article ID: Q108404 |
The information in this article applies to:
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, click Help in Registry Editor, click the Contents tab, and click to view the "Restoring the Registry" topic.
SYMPTOMSIf you click the Date button on the Header And Footer toolbar, Microsoft Word may insert a date format that is different from the one you set using the DATEFORMAT switch in the [Microsoft Word] section of your Winword6.ini file.
CAUSEWhen you insert the date using the Date toolbar button, Word inserts a DATE field with the \L switch, which inserts the date with the last format you selected using the Date And Time command (Insert menu).
WORKAROUNDTo work around this problem, use any of the following methods.
Method 1On the Tools menu, click Macro. In the Macro Name box type "InsertDateField" (without the quotation marks) and click Create. Change the macro to read as follows:
Sub MAIN InsertField .Field = "date" End SubClose and save the macro. To specify a default date format in Word for Windows, modify the Winword6.ini file. In Word for Windows NT, modify the Windows Registry as described in the "More Information" section below. Method 2: After you insert the DATE field using the Date toolbar button, switch to field codes view (press ALT+F9 or SHIFT+F9) and remove the \L switch from the field. For example, change { DATE \L } to { DATE }. Method 3: On the Insert menu, click Date And Time. Select the format you want and then choose OK. The next time you click the Date toolbar button, Word uses the format you last selected in the Date And Time dialog box. Method 4: Use the following procedure to record a Macro that inserts the date format of your choice, and assign it to the Toolbar:
STATUSMicrosoft has confirmed this to be a problem in Word for Windows versions 6.0, 6.0a, and 6.0c. This problem was corrected in Word for Windows 95 version 7.0. The \L switch is no longer inserted.
MORE INFORMATIONTo modify the Winword6.ini file in Word for Windows, follow these steps (see below for Word for Windows NT):
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows. 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 online Help topic in Registry Editor (Regedit.exe). Note that you should understand how to restore the registry if a problem occurs after you edit it. For information about how to do this, click Help in Registry Editor, click the Contents tab, and click to view the "Restoring the Registry" topic.
REFERENCES"Microsoft Word User's Guide," version 6.0, Chapter 31, "Customizing and Optimizing Word," "Customizing Toolbars" section
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |