MailMergeFields.Add(Range, String) Method

Definition

Returns a MailMergeField object that represents a mail merge field added to the data source document.

public:
 Microsoft::Office::Interop::Word::MailMergeField ^ Add(Microsoft::Office::Interop::Word::Range ^ Range, System::String ^ Name);
public Microsoft.Office.Interop.Word.MailMergeField Add (Microsoft.Office.Interop.Word.Range Range, string Name);
abstract member Add : Microsoft.Office.Interop.Word.Range * string -> Microsoft.Office.Interop.Word.MailMergeField
Public Function Add (Range As Range, Name As String) As MailMergeField

Parameters

Range
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
String

Required String. The name of the field.

Returns

Applies to