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

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

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 : kbualink97 kbusage kbfield
Version : WINDOWS:2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a; :
Platform : WINDOWS
Issue type :


Last Reviewed: December 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.