Cette documentation est archivée et n’est pas conservée.

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)

Dim Range As Range
Dim Name As String
Dim returnValue As MailMergeField
Dim mailMergeFields1 As MailMergeFields
returnValue = mailMergeFields1.Add(Range, Name)

MailMergeField Add(
	[In] Range Range, 
	[In] string Name
public MailMergeField Add(
	/*in*/Range Range, 
	/*in*/System.String Name
function Add(
	 Range : Range, 
	 Name : String
) : MailMergeField;



Required Range object. The range where you want the field to appear. This field replaces the range, if the range isn't collapsed.


Required String. The name of the field.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms