MailMerge Property

Microsoft Publisher Visual Basic

object that represents the mail merge functionality for the specified publication.

expression.MailMerge

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example displays the information from the current data record in the data source.

Sub ViewMergeData()
    ActiveDocument.MailMerge.ViewMailMergeFieldCodes = False
End Sub
		

This example displays the Mail Merge Recipients dialog box, which contains the records from the data source.

Sub ExecuteMergeField()
    ActiveDocument.MailMerge.DataSource.OpenRecipientsDialog
End Sub