Microsoft KB Archive/64384

Macro Recorder Doesn’t Record Date Field Formats Correctly

PSS ID Number: Q64384 Article last modified on 07-21-1993

1.00 1.10 WINDOWS

Summary: When using the Macro Recorder to record the keyboard or mouse sequence of inserting a date field along with a selected date format, the recorder will not record the date-time picture switch unless it is typed in manually in the Field Code text box. This is only a problem while recording the menu commands and using the Insert Fields dialog box.

More Information: To set the date format while the Macro Recorder is running, do the following: 1. From the Insert menu, choose Field. 2. Place the insertion point in the Field Code text box and enter the following: Date @ “MMMM d, yyyy” 3. Select OK and stop the Macro Recorder. The Macro Recorder will record the following code: Sub MAIN InsertField .Field = “date @” +chr$(34)+"MMMM ddd, yyyy"+chr$ (34) End Sub Microsoft has confirmed this to be a problem in version 1.00. This problem was corrected in version 1.10a of Word for Windows.

Reference(s): “Microsoft Word for Windows User’s Reference” pages 86-91, 94, 185-188.

Additional reference words: w4wmacro