Microsoft KB Archive/275358

= WD2001: Conditional Word Merge Field Returns Incorrect Results =

Article ID: 275358

Article Last Modified on 1/29/2007

-

APPLIES TO


 * Microsoft Word 2001 for Mac

-



This article was previously published under Q275358



SYMPTOMS
You can use an If...Then...Else field in a Microsoft Word 2001 merge document to return a specific result depending on the content of the data in each record of the data source. This Word merge field returns incorrect results when the following conditions are true:  The first character in both the data field and the merge field criteria is numeric.

-and- The leading numeric characters up to the first non-numeric character in the merge field criteria are identical to the numeric characters up to the first alphabetical character in the data field.

-and- The first alphabetical character in the data field is not separated from the leading numeric characters by more than one of the following special characters:

`~@#$&_,.?<>;:'&quot;[]{}\|



NOTE: It is not necessary for there to be alphabetical characters in the conditional merge field for a match to occur with data that contains alphabetical characters.

It is also not necessary for the alphabetical characters in the conditional merge field to match the alphabetical characters in the data field, as long as the leading numeric characters match.

The question mark (?) and the asterisk (*) return different results when they are used at the end of the leading numeric characters in the merge field criteria.

Examples
NOTE: In the following table, equals one of the following special characters

`~@#$&_,.?<>;:'&quot;[]{}\|

and equals one of the following special characters:

!%^=+-*/

  MergeField      Matches              Fails Criteria                            To Match --     ---              ---    123             123                  12 or 1234 123ABC              321ABC 123           123## or 123 123 ABC        123##ABC or 123 ABC

123ABC         123                  12 or 1234 123XXX              12ABC or 1234ABC or 321ABC 123           123## or 123 123 XXX        123##ABC or 123 ABC 123??XXX or 123??456

123 ABC   123                  12 or 1234 123XXX              12ABC or 1234ABC or 321ABC 123           123## or 123 123 XXX        123##ABC or 123 ABC

123?           123                  12 or 1234 123XXX              12ABC or 1234ABC or 321ABC 123           123## or 123 123 XXX        123##ABC or 123 ABC 123??                  123??XXX or 123??456

123??          123                  12 or 1234 123XXX              12ABC or 1234ABC or 321ABC 123           123                    123 XXX         123##ABC or 123 ABC 123??                   123                     123??XXX or 123??456

123*           anything starting with 123



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
For more information about Word merge fields, follow these steps:
 * 1) On the Help menu, click Contents and Index, click Index, and then click M.
 * 2) Scroll down until you locate merge, and then click the arrow to the left to view a list of topics under the general topic.
 * 3) Click Word fields for use in data merge.

If you cannot find the information that you want, ask the Office Assistant.

Additional query words: off2001kb mac macword WD2001KB merge data mail source if then else error wrong

Keywords: kbbug kbnofix KB275358

-

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

© Microsoft Corporation. All rights reserved.