Share via


MailMergeFields.AddSkipIf Method

Adds a SKIPIF field to a mail merge main document. Returns a MailMergeField object.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function AddSkipIf ( _
    Range As Range, _
    MergeField As String, _
    Comparison As WdMailMergeComparison, _
    ByRef CompareTo As Object _
) As MailMergeField
'Usage
Dim instance As MailMergeFields
Dim Range As Range
Dim MergeField As String
Dim Comparison As WdMailMergeComparison
Dim CompareTo As Object
Dim returnValue As MailMergeField

returnValue = instance.AddSkipIf(Range, _
    MergeField, Comparison, CompareTo)
MailMergeField AddSkipIf(
    Range Range,
    string MergeField,
    WdMailMergeComparison Comparison,
    ref Object CompareTo
)

Parameters

  • MergeField
    Type: System.String
    Required String. The merge field name.
  • CompareTo
    Type: System.Object%
    Optional Object. The text to compare with the contents of MergeField.

Return Value

Type: Microsoft.Office.Interop.Word.MailMergeField

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.

See Also

Reference

MailMergeFields Interface

MailMergeFields Members

Microsoft.Office.Interop.Word Namespace