Adds a SKIPIF field to a mail merge main document. Returns a MailMergeField object. A SKIPIF field compares two expressions, and if the comparison is true, SKIPIF moves to the next data record in the data source and starts a new merge document.
Syntax
expression.AddSkipIf(Range, MergeField, Comparison, CompareTo)
expression Required. An expression that returns a MailMergeFields object.
Range Required Range object. The location for the SKIPIF field.
MergeField Required String. The merge field name.
Comparison Required Long. The operator used in the comparison. Can be one of the following WdMailMergeComparison constants: wdMergeIfEqual, wdMergeIfGreaterThan, wdMergeIfGreaterThanOrEqual, wdMergeIfIsBlank, wdMergeIfIsNotBlank, wdMergeIfLessThan, wdMergeIfLessThanOrEqual, or wdMergeIfNotEqual.
CompareTo Optional Variant. The text to compare with the contents of MergeField.