Microsoft KB Archive/78935

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

Article ID: 78935

Article Last Modified on 1/18/2007

-

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 Q78935



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
 Press CTRL+F9 to insert the field braces. Type if 1 = 1. From the Insert menu, choose Field, and select Auto No. Choose the OK button. Insert quotation marks around the nested AUTONUM field. The completed field should appear as follows:

{if 1 = 1 &quot;{autonum}&quot;}

 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: kbfield kbualink97 kbusage KB78935

-

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

© Microsoft Corporation. All rights reserved.