MailMerge Members (Publisher)

GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents the mail merge and catalog merge functionality in Microsoft Publisher.

Methods

Name

Description

CreateShortcut

Creates a shortcut to the file that contains the list of recipients or products for a mail merge publication.

Execute

Performs the specified mail merge or catalog merge operation. Returns a Document object that represents the new or existing publication specified as the destination of the merge results. Returns Nothing if the merge is executed to a printer.

ExportRecipientList

Exports the list of mail-merge recipients to a Microsoft Office Access (.mdb) file or to a comma-delimited text (.csv) file.

OpenDataSource

Attaches a data source to the specified publication, which becomes a main publication if it is not one already.

ShowWizardEx

Displays the specified catalog or mail merge wizard in a document.

Properties

Name

Description

Application

Used without an object qualifier, this property returns an Application object that represents the current instance of Publisher. Used with an object qualifier, this property returns an Application object that represents the creator of the specified object. When used with an OLE Automation object, it returns the object's application.

DataSource

Returns a MailMergeDataSource object that refers to the data source attached to a mail merge or catalog merge main publication.

DocumentUpdating

Returns or sets a Boolean indicating whether the screen is updated while mail merge code is running. Default is True (the screen is updated). Read/write.

EmailMergeEnvelope

Returns the EmailMergeEnvelope object associated with the parent MailMerge object. Read-only.

Parent

Returns an object that represents the parent object of the specified object. For example, for a TextFrame object, returns a Shape object representing the parent shape of the text frame. Read-only.

SuppressBlankLines

True to suppress blank lines when mail merge fields in a mail merge main document are empty. Read/write Boolean.

Type

Gets or sets the type of mail merge represented by the parent MailMerge object. Read/write.

ViewMailMergeFieldCodes

True if merge field names are displayed in a mail merge publication; False if information from the current record is displayed. Read/write Boolean. .

WizardState

Returns or sets a Long indicating the current Mail Merge wizard step for a publication. The WizardState property returns a number that equates to the current Mail Merge wizard step; a zero (0) means the Mail Merge wizard is closed. Read/write.