WD: AUTONUM Field Doesn't Work with IF Statement in WinWord

Last reviewed: February 5, 1998
Article ID: Q78935
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 for Windows, using an IF statement in a field removes the numeric value that is created by a nested AUTONUM field. In Word 7.x and 97 you get the following error message instead of no result:

   Error! Unknown Op code for conditional.

MORE INFORMATION

This problem also occurs if you nest an INCLUDE field within an IF statement and the included file contains AUTONUM fields. You cannot change this behavior because the IF field evaluation always produces the result text. All nested fields are evaluated, and nested field instructions are not preserved.

Steps To Reproduce Problem

  1. Press CTRL+F9 to insert the field braces.

  2. Type "if 1 = 1" (without the quotation marks). From the Insert menu, choose Field, and select Auto No. Choose the OK button.

  3. Insert quotation marks around the nested AUTONUM field. The completed field should appear as follows:

          {if 1 = 1 "{autonum}"}
    

  4. Select the entire field, and press F9. If field codes are displaying, press SHIFT+F9 to display the field results. This field returns no result.

STATUS

Microsoft is researching this problem and will post new information here as it becomes available.


KBCategory: kbusage
KBSubcategory: kbfield
Additional query words: gone missing numbers 2.0 6.0 6.0a 6.0c
winword 7.0 word95 word6 2.0a 2.0b 2.0a-CD winword2 word7 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.