MailMergeFields.AddSkipIf Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a SKIPIF field to a mail merge main document. Returns a MailMergeField object.
public Microsoft.Office.Interop.Word.MailMergeField AddSkipIf (Microsoft.Office.Interop.Word.Range Range, string MergeField, Microsoft.Office.Interop.Word.WdMailMergeComparison Comparison, ref object CompareTo);
abstract member AddSkipIf : Microsoft.Office.Interop.Word.Range * string * Microsoft.Office.Interop.Word.WdMailMergeComparison * obj -> Microsoft.Office.Interop.Word.MailMergeField
Public Function AddSkipIf (Range As Range, MergeField As String, Comparison As WdMailMergeComparison, Optional ByRef CompareTo As Object) As MailMergeField
Parameters
- MergeField
- String
Required String. The merge field name.
- Comparison
- WdMailMergeComparison
Required WdMailMergeComparison. The operator used in the comparison.
- CompareTo
- Object
Optional Object. The text to compare with the contents of MergeField
.
Returns
Remarks
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.