Microsoft KB Archive/88774

{|
 * width="100%"|

Incorrect Results Using Wildcards in Selective Print Merge

 * }

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} <> &quot;????24th Ave.&quot;} {nextif {MERGEFIELD address} <> &quot;????21st Ave.&quot;} 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} <> &quot;????Microsoft Way&quot;} {nextif {MERGEFIELD address} <> &quot;????39 Stars Street&quot;} {nextif {MERGEFIELD address} <> &quot;????Twenty-First Street&quot;}

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

&quot;235 24th Ave.&quot; becomes &quot;235 Twenty-Fourth Ave.&quot; &quot;235 21st Ave.&quot; becomes &quot;235 Twenty-First Ave.&quot;

-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" Additional query words: 6.0 2.0 conditional word6 winword winword2

Keywords : kbprint kbmerge

Issue type :

Technology :