The information in this article applies to:
SUMMARY
In a mail merge main document, you can use an IF (IF...THEN...ELSE) conditional statement to check whether one condition or multiple conditions are met. Q214827 WD2000: How to Use Nested IF Fields in a Mail Merge Document Q212028 WD2000: How to Use Conditional Field to Specify Number of Digits Q212178 WD2000: Cannot Merge a Barcode Field Based on a Condition Q220250 WD2000: Err Msg: "Fields Are Nested Too Deeply" in Mail Merge MORE INFORMATION
You can specify multiple conditions by nesting a COMPARE field inside an IF field. To Test Whether Multiple Conditions Are MetTo test whether multiple fields meet certain conditions, you can use an AND conditional statement in your mail merge main document similar to the following:{ IF { = AND ( { COMPARE { MERGEFIELD Field_1 } = "Value"}, { COMPARE { MERGEFIELD Field_2 } = "Value" } ) } = 1 "True Instructions" "False Instructions" }The result of these nested COMPARE statements is the "True Instructions" when both Field_1 and Field_2 are equal to "Value"; otherwise, the "False Instructions" is given as the result. NOTES:
To Test Whether One Condition Is MetTo test whether one of the fields meets a particular condition, you can use an OR conditional statement in your mail merge main document similar to the following:{ IF { = OR ( { COMPARE { MERGEFIELD Field_1 } <= "Value" }, { COMPARE { MERGEFIELD Field_2 } >= "Value" } ) } = 1 "True Instructions" "False Instructions" }The result of these nested COMPARE statements is the "True Instructions" when either Field_1 or Field_2 is equal to "Value"; otherwise, the "False Instructions" is given as the result. NOTES:
Additional query words: mailmerge
Keywords : kbfield kbmerge wd2000 |
Last Reviewed: December 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |