The information in this article applies to:
SYMPTOMSA print merge or mail merge operation may yield incorrect results if you use a conditional statement to evaluate alphanumeric data when the first character of the data is numeric. CAUSEThis behavior is by design of Microsoft Word. This happens because conditional statements (IF fields) evaluate only the first two characters of a numeric string. WORKAROUNDTo work around this problem, use the appropriate method for your version of Word. Word Versions 6.x, 7.xModify the data so that each field begins with a non-numeric character. Then, modify the conditional field in the main merge document to match the data. To do this, follow these steps:
Word Version 2.xIf your alphanumeric data contains entries that begin with a numeric character, use the print merge Record Selection feature to perform a conditional merge of the data. By setting record selection rules, you can merge only data records that meet the criteria you specify.The disadvantage of this workaround is that you must perform multiple print merge operations if your main document contains more than one conditional statement for alphanumeric fields. In this case, you must modify your main document for each condition, change the Record Selection settings to evaluate each condition individually and then perform a separate print merge operation. The functionality of the Record Selection feature differs from that of an IF field, so you must modify your print merge procedure accordingly. For example, the following procedure uses the Record Selection feature to perform a conditional print merge of the sample data file above. This procedure replaces the following conditional statement: {IF {MERGEFIELD TEST} = "1AB" "This is true"}To use this procedure, follow these steps:
MORE INFORMATIONFor example, using the following sample data file, the following conditional statement incorrectly yields a true result for the first and second records, although only the second record satisfies the condition: {IF {MERGEFIELD NUMBER} = "1AB" "This is true"}NOTE: The IF field evaluated only the first two characters (1A) of the numeric string. Sample Data File
Additional query words: winword2 numbers strings alphabetic
Keywords : kbdta kbfield winword kbmerge macword word6 winword2 word7 word95 |
Last Reviewed: January 4, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |