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
- Range
Type: Microsoft.Office.Interop.Word.Range
Required Range object. The location for the MERGEREC field.
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.