MailMergeFields.Add(Range, String) 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);
Parameters
Range
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 String

Required String. The name of the field.

Returns

Applies to