MailMergeFields.Add Method
Returns a MailMergeField object that represents a mail merge field added to the data source document.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function Add ( _
Range As Range, _
Name As String _
) As MailMergeField
'Usage
Dim instance As MailMergeFields
Dim Range As Range
Dim Name As String
Dim returnValue As MailMergeField
returnValue = instance.Add(Range, Name)
MailMergeField Add(
Range Range,
string Name
)
Parameters
- Range
Type: Microsoft.Office.Interop.Word.Range
Required Range object. The range where you want the field to appear. This field replaces the range, if the range isn't collapsed.
- Name
Type: System.String
Required String. The name of the field.
Return Value
Type: Microsoft.Office.Interop.Word.MailMergeField