Share via


MailMergeFields.AddMergeRec Method

Adds a MERGEREC 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 AddMergeRec ( _
    Range As Range _
) As MailMergeField
'Usage
Dim instance As MailMergeFields
Dim Range As Range
Dim returnValue As MailMergeField

returnValue = instance.AddMergeRec(Range)
MailMergeField AddMergeRec(
    Range Range
)

Parameters

Return Value

Type: Microsoft.Office.Interop.Word.MailMergeField

Remarks

A MERGEREC field inserts the number of the current data record (the position of the data record in the current query result) during a mail merge.

See Also

Reference

MailMergeFields Interface

MailMergeFields Members

Microsoft.Office.Interop.Word Namespace