Microsoft KB Archive/82091

= WD: WinWord: ASK Fields with Default Answers Prompt First =

Article ID: 82091

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Word 2.0 Standard Edition
 * Microsoft Word 2.0a
 * Microsoft Office Word 2003
 * Microsoft Word 2.0c
 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q82091



SUMMARY
In Microsoft Word, if you supply a field as a default answer for an ASK field (by using the \d switch within the ASK field) that field is updated by an AutoNew macro before any other ASK fields in your document are updated.

This behavior can cause problems if the ASK field containing the default answer is not physically the first field in the template. If it is not the first field, the field prompts you for information twice. It is updated first and then again in order of its physical location in the template. If the prompts are answered differently, Word uses the second reply in the document.

NOTE: The use of fields as default answers to ASK fields in Word for Windows version 1.x does not cause this reaction when the AutoNew macro runs.



MORE INFORMATION
ASK fields are generally used in template files in conjunction with an AutoNew macro. When you create a new document based on such a template, the fields are automatically updated so that they prompt you for appropriate answers to be filled in at the bookmark locations.

If you use the \d switch within an ASK field to supply another field as the default answer when the prompt appears, an AutoNew macro runs on that ASK field first (regardless of its position in the document).

Steps to Reproduce Problem
 From the File menu, choose New, select the Template option button, and choose the OK button to create a new template file based on Normal.dot. Press CTRL+F9 to create the field braces, and insert the following fields:

{ask to &quot;Who is this memo to?&quot;}{to}

{ask from &quot;Who is it from?&quot;}{from}

{ask today &quot;Is today's date correct? If not, type in

the correct date.&quot; \d {date}}{today}

{ask hour &quot;Time?&quot; \d {time}}{hour}

 From the File menu, choose Save, type a name for the template, and choose the OK button. From the Tools menu, choose macro and record, type a name for the macro, and choose the record button. Select the Macro available To and choose the OK button. Record the following steps:  From the Edit menu, choose Select All. Press the F9 key. Cancel the dialog boxes.</li> From the tools menu, select Macro and choose Stop Recording.</li></ol> </li> From the File menu, choose Close, then choose the Yes button when prompted to save changes to the template.</li> From the File menu, choose New, select the template name assigned in step 3, select the Document option button, then choose the OK button.

The order of prompts is as follows:

Date

Time

To

From

Date

Time

In Word version 6.0, in Page Layout view, the order of prompts is:

Date

Time

Date

Time

To

From

Date

Time

The order of prompts should be as follows:

To

From

Date

Time

</li></ol>

Because the default answers to the ASK fields are reserved fields, DATE and TIME, the AutoNew macro causes them to be updated first rather than in the appropriate order.

Reference(s):
&quot;Microsoft Word for Windows User's Guide,&quot; version 2.0, pages 646-650, 763-765, 786

Additional query words: 6.0a 2.0 2.0a 6.0 6.0c winword2 word7 word6 7.0 word95 winword word97

Keywords: kbfield kbualink97 kbusage KB82091

-

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

© Microsoft Corporation. All rights reserved.