Nested Fields in IF Statement Always Update in WinWord

Last reviewed: September 19, 1997
Article ID: Q74053
The information in this article applies to:
  • Microsoft Word for Windows versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c

SUMMARY

All fields nested within an IF statement are updated during the evaluation of that IF statement, regardless of whether the IF statement proves TRUE or FALSE. In the following example

   {IF test="yes" "{fillin "response one"}" "{fillin "response two"}"}

both fillin fields are updated, prompting you twice. Only one prints, based on the result of the IF statement. This happens because Word for Windows updates fields from the inside out. Both of the fillin fields get updated before the IF statement test is performed. This functionality is by design.

MORE INFORMATION

This behavior can create challenges if you need to selectively perform FILLIN or ASK statements during a print merge. You can do such tasks by using a different logical structure than the one above. The following example

   {fillin {if test = "yes" "response one" "response two"}}

prompts you with "response one" if test is "yes", and "response two" if test is "no". This allows conditional fillin prompts without getting multiple prompts.

Reference(s):

"Microsoft Word for Windows and OS/2 Technical Reference," page 335


KBCategory: kbusage
KBSubcategory: kbfield kbmerge
Additional query words: 1.0 1.1 1.1a 2.0 1.0 winword2
winword 1.10 1.10a 2.0 2.0a 2.0a 2.0b 2.0a-CD 2.0b 2.0a-CD
field


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: September 19, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.