Export (0) Print
Expand All

Application.MailMergeRecipientListClose Event

Office 2007
Fires when the user closes the Mail Merge Recipients dialog box. (From the Mail Merge or E-mail Merge task pane, click Edit Recipient List). Also fires when the user closes the Catalog Merge Product List dialog box, which opens when the user clicks Edit Product List in the Catalog Merge task pane.

Version Information
 Version Added:  Publisher 2007



expression   A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
DocRequiredDocumentThe current publication.


For more information about using events with the Application object, see Using Events with the Application Object.


The following Microsoft Visual Basic for Applications (VBA) macro shows how to handle the MailMergeWizardFollowUpCustom event. It displays a message notifying the user that the string described above was displayed.

Visual Basic for Applications
Private Sub pubApplication_MailMergeRecipientListClose(ByVal Doc As Document)
    MsgBox "The Mail Merge Recipients dialog box has closed."
End Sub

For this event to occur, you must place the following line of code in the General Declarations section of your module.

Visual Basic for Applications
Private WithEvents pubApplication As Application

Then run the following initialization procedure.

Visual Basic for Applications
Public Sub Initialize_pubApplication()
    Set pubApplication = Publisher.Application
End Sub

Community Additions

© 2014 Microsoft