Syntax
MailMergeInsertIf .MergeField = text, .Comparison = number [, .CompareTo = text] [, .TrueAutoText = text] [, .TrueText = text] [, .FalseAutoText = text] [, .FalseText = text]
Remarks
Inserts an IF field into a main document at the insertion point. When updated, an IF field compares a field in a data record to a specified value, and then inserts the appropriate text according to the result of the comparison.
Argument | Explanation |
.MergeField | The name of the merge field you want to compare to the text specified by .CompareTo. |
.Comparison | Specifies the operator for the comparison: 0 (zero) = (equal to) 1 <> (not equal to) 2 < (less than) 3 > (greater than) 4 <= (less than or equal to) 5 >= (greater than or equal to) 6 = " " (is blank) 7 <> " " (is not blank) |
.CompareTo | Text to compare to the merge field. This argument is required unless .Comparison is set to 6 (is blank) or 7 (is not blank). |
.TrueAutoText | An AutoText entry containing the text to insert if the comparison is true (.TrueText is ignored). |
.TrueText | Text to insert if the comparison is true. |
.FalseAutoText | An AutoText entry containing the text to insert if the comparison is false (.FalseText is ignored). |
.FalseText | Text to insert if the comparison is false. |
See Also
InsertField, MailMergeInsertNext, MailMergeInsertNextIf, MailMergeInsertSkipIf