MailMergeFields Interface

Definition

A collection of MailMergeField objects that represent the mail merge related fields in a document.

public interface class MailMergeFields : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("0002091F-0000-0000-C000-000000000046")]
public interface MailMergeFields : System.Collections.IEnumerable
type MailMergeFields = interface
    interface IEnumerable
Public Interface MailMergeFields
Implements IEnumerable
Attributes
Implements

Remarks

Use the Fields property to return the MailMergeFields collection.

Use the Add(Range, String) method to add a merge field to the MailMergeFields collection.

Use Fields(index), where index is the index number, to return a single MailMergeField object.

The MailMergeFields collection has additional methods, such as AddAsk(Range, String, Object, Object, Object) and AddFillIn(Range, Object, Object, Object), for adding fields related to a mail merge operation.

Properties

Application

Returns a Application object that represents the Microsoft Word application.

Count

Returns the number of items in the specified collection.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

Item[Int32]

Returns an individual object in a collection.

Parent

Returns an object that represents the parent object of the specified object.

Methods

Add(Range, String)

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

AddAsk(Range, String, Object, Object, Object)

Adds an ASK field to a mail merge main document. Returns a MailMergeField object.

AddFillIn(Range, Object, Object, Object)

Adds a FILLIN field to a mail merge main document. Returns a MailMergeField object.

AddIf(Range, String, WdMailMergeComparison, Object, Object, Object, Object, Object)

Adds an IF field to a mail merge main document. Returns a MailMergeField object.

AddMergeRec(Range)

Adds a MERGEREC field to a mail merge main document. Returns a MailMergeField object.

AddMergeSeq(Range)

Adds a MERGESEQ field to a mail merge main document. Returns a MailMergeField object.

AddNext(Range)

Adds a NEXT field to a mail merge main document. Returns a MailMergeField object.

AddNextIf(Range, String, WdMailMergeComparison, Object)

Adds a NEXTIF field to a mail merge main document. Returns a MailMergeField object.

AddSet(Range, String, Object, Object)

Adds a SET field to a mail merge main document. Returns a MailMergeField object.

AddSkipIf(Range, String, WdMailMergeComparison, Object)

Adds a SKIPIF field to a mail merge main document. Returns a MailMergeField object.

GetEnumerator()

Applies to