WD: WinWord: ASK Fields with Default Answers Prompt First

Last reviewed: February 5, 1998
Article ID: Q82091
The information in this article applies to:
  • Microsoft Word for Windows versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows

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

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

  2. Press CTRL+F9 to create the field braces, and insert the following fields:

          {ask to "Who is this memo to?"}{to}
          {ask from "Who is it from?"}{from}
          {ask today "Is today's date correct?  If not, type in
          the correct date." \d {date}}{today}
          {ask hour "Time?" \d {time}}{hour}
    

  3. From the File menu, choose Save, type a name for the template, and choose the OK button.

  4. 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:

    a. From the Edit menu, choose Select All.

    b. Press the F9 key.

    c. Cancel the dialog boxes.

    d. From the tools menu, select Macro and choose Stop Recording.

  5. From the File menu, choose Close, then choose the Yes button when prompted to save changes to the template.

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

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):

"Microsoft Word for Windows User's Guide," version 2.0, pages 646-650, 763-765, 786


KBCategory: kbusage
KBSubcategory: kbfield
Additional query words: 6.0a 2.0 2.0a 6.0 6.0a 6.0c winword2
word7 word6 6.0c 7.0 word95 winword word97


Keywords : kbfield kbualink97 kbusage
Version : 2.x 6.0 6.0a 6.0c 7.0 7.0a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.