Incorrect Results Using Wildcards in Selective Print Merge

Last reviewed: February 5, 1998
Article ID: Q88774
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

SUMMARY

If you use wildcard characters, such as the asterisk (*) or question mark (?), in the criteria for a selective print merge operation, the results of your print merge may be incorrect or incomplete. This problem occurs if you use wildcards followed by an ordinal number in numeric format to define the selection criteria in the NEXTIF, SKIPIF, or IF fields.

MORE INFORMATION

Word for Windows evaluates ordinal numbers in numeric format, such as 24th or 21st, as integers instead of text. This leads to incorrect print merge results when an ordinal number follows a wildcard.

For example, the following statements may produce incomplete or incorrect print merge results because a numeric ordinal number follows the wildcard (?):

   {skipif {MERGEFIELD address} <> "????24th Ave."}
   {nextif {MERGEFIELD address} <> "????21st Ave."}

However, the following statements produce correct and complete print merge results because non-ordinal alphabetic or numeric characters, or ordinal numbers in alphabetic format follow the wildcard (?):

   {skipif {MERGEFIELD address} <> "????Microsoft Way"}
   {nextif {MERGEFIELD address} <> "????39 Stars Street"}
   {nextif {MERGEFIELD address} <> "????Twenty-First Street"}

Workarounds

To work around this behavior, change the syntax of numeric records to alphabetic. The following is an example:

   "235 24th Ave." becomes "235 Twenty-Fourth Ave."
   "235 21st Ave." becomes "235 Twenty-First Ave."

 -or-

In the data document, place the data that contains a numeric ordinal number in a separate field so that it can be evaluated without using wildcard characters. The following is an example:

   -----------------------            ------------------------------
   |ADDRESS              |            |STREET1   | STREET2         |
   |---------------------|  becomes   |----------|-----------------|
   |235 24th Ave.        |            |235       | 24th Ave.       |
   |---------------------|            |----------|-----------------|
   |235 21st Ave.        |            |235       | 21st Ave.       |
   -----------------------            ------------------------------

For more information on using wildcards to perform a selective print merge in Word for Windows, query on the following words in the Microsoft Knowledge Base:

   and wildcard and selective and records


KBCategory:
KBSubcategory: kbmerge
Additional query words: 6.0 2.0 2.0a 2.0a-CD conditional word6
winword winword2
Keywords : kbmerge kbprint
Version : 1.x 2.x 6.0 6.0a 6.0c
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.