SKIPIF No Longer Functions Properly if Used With NEXT Field

Last reviewed: July 30, 1997
Article ID: Q69319
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, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows

SUMMARY

The SKIPIF field successfully skips specified data records to create individual documents for each data record. However, SKIPIF does not work properly when combined with the NEXT field.

MORE INFORMATION

The SKIPIF field compares a data item against specified guidelines made about a data record. If the comparison is TRUE, the present data record is skipped, and Word for Windows does not print it. The next record is selected and compared. If the comparison is FALSE, the data record is printed, and Word for Windows moves on to check the next record.

SKIPIF successfully skips specified data records to create individual documents for each data record. The following example illustrates this:

Word 6.0, 7.0, 97

   {skipif {zip} = "98000"}{name}
   {street}
   {city}, {state}  {zip}

Word 1.0, 2.0

   {data c:\\winword\\mydoc.doc}{skipif {zip} = "98000"}{name}
   {street}
   {city}, {state}  {zip}

This example successfully skips data records that have a zip code of 98000 and prints each data record that does not have a 98000 zip code on a new sheet of paper.

Because the SKIPIF field does not function properly with the NEXT field, if you try to use the SKIPIF and NEXT fields to create a list or address labels, Word for Windows does not print or skip data records properly. The following example illustrates this:

Word 6.0, 7.0, 97

   {skipif {zip} = "98000"}{name}
   {street}
   {city}, {state}  {zip}

   {next}{skipif {zip} = "98000"}{name}
   {street}
   {city}, {state}  {zip}

Word 1.0, 2.0

   {data c:\\winword\\mydoc.doc}{skipif {zip} = "98000"}{name}
   {street}
   {city}, {state}  {zip}

   {next}{skipif {zip} = "98000"}{name}
   {street}
   {city}, {state}  {zip}

This example results in erratic placement of data records in your document or an empty print merged document.


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

Keywords : kbfield kbmerge
Version : 1.x 2.x 6.0 6.0a 6.0c 7.0 7.
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: July 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.