MailMerge MailMerge MailMerge Interface

Definition

Represents the mail merge functionality in Microsoft Word.

public interface class MailMerge
[System.Runtime.InteropServices.Guid("00020920-0000-0000-C000-000000000046")]
public interface MailMerge
Public Interface MailMerge
Attributes

Remarks

Use the MailMerge property to return the MailMerge object. The MailMerge object is always available regardless of whether the mail merge operation has begun. Use the State property to determine the status of the mail merge operation.

Properties

Application Application Application

Returns a Application object that represents the Microsoft Word application.

Creator Creator Creator

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

DataSource DataSource DataSource

Returns a MailMergeDataSource object that refers to the data source attached to a mail merge main document.

Destination Destination Destination

Returns or sets the destination of the mail merge results.

Fields Fields Fields

Returns a MailMergeFields collection that represents all the mail merge related fields in the specified document.

HighlightMergeFields HighlightMergeFields HighlightMergeFields

Determines if the merge fields in a document are highlighted.

MailAddressFieldName MailAddressFieldName MailAddressFieldName

Returns or sets the name of the field that contains e-mail addresses that are used when the mail merge destination is electronic mail.

MailAsAttachment MailAsAttachment MailAsAttachment

Determines if the merge documents are sent as attachments when the mail merge destination is an e-mail message or a fax.

MailFormat MailFormat MailFormat

Returns a WdMailMergeMailFormat constant that represents the format to use when the mail merge destination is an e-mail message.

MailSubject MailSubject MailSubject

Returns or sets the subject line used when the mail merge destination is electronic mail.

MainDocumentType MainDocumentType MainDocumentType

Returns or sets the mail merge main document type.

Parent Parent Parent

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

ShowSendToCustom ShowSendToCustom ShowSendToCustom

Returns or sets a String corresponding to the caption on a custom button on the Complete the merge step (step six) of the Mail Merge Wizard.

State State State

Returns the current state of a mail merge operation.

SuppressBlankLines SuppressBlankLines SuppressBlankLines

Determines if blank lines are suppressed when mail merge fields in a mail merge main document are empty.

ViewMailMergeFieldCodes ViewMailMergeFieldCodes ViewMailMergeFieldCodes

Determines if merge field names are displayed in a mail merge main document.

WizardState WizardState WizardState

Returns or sets an Integer indicating the current Mail Merge Wizard step for a document.

Methods

Check() Check() Check()

Simulates the mail merge operation, pausing to report each error as it occurs.

CreateDataSource(Object, Object, Object, Object, Object, Object, Object, Object, Object) CreateDataSource(Object, Object, Object, Object, Object, Object, Object, Object, Object) CreateDataSource(Object, Object, Object, Object, Object, Object, Object, Object, Object)

Creates a Microsoft Word document that uses a table to store data for a mail merge.

CreateHeaderSource(String, Object, Object, Object) CreateHeaderSource(String, Object, Object, Object) CreateHeaderSource(String, Object, Object, Object)

Creates a Microsoft Word document that stores a header record that's used in place of the data source header record in a mail merge.

EditDataSource() EditDataSource() EditDataSource()

Opens or switches to the mail merge data source.

EditHeaderSource() EditHeaderSource() EditHeaderSource()

Opens the header source attached to a mail merge main document, or activates the header source if it's already open.

EditMainDocument() EditMainDocument() EditMainDocument()

Activates the mail merge main document associated with the specified header source or data source document.

Execute(Object) Execute(Object) Execute(Object)

Performs the specified mail merge operation.

OpenDataSource(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenDataSource(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenDataSource(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Attaches a data source to the specified document, which becomes a main document if it's not one already.

OpenDataSource2000(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenDataSource2000(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenDataSource2000(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Reserved for internal use.

OpenHeaderSource(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenHeaderSource(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenHeaderSource(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Attaches a mail merge header source to the specified document.

OpenHeaderSource2000(String, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenHeaderSource2000(String, Object, Object, Object, Object, Object, Object, Object, Object, Object) OpenHeaderSource2000(String, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Reserved for internal use.

ShowWizard(Object, Object, Object, Object, Object, Object, Object) ShowWizard(Object, Object, Object, Object, Object, Object, Object) ShowWizard(Object, Object, Object, Object, Object, Object, Object)

Displays the Mail Merge Wizard in a document.

UseAddressBook(String) UseAddressBook(String) UseAddressBook(String)

Reserved for internal use.

Applies to