DocumentBase.MailMergeAfterMerge Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs after all records in a mail merge have merged successfully.
public:
event Microsoft::Office::Tools::Word::MailMergeAfterMergeEventHandler ^ MailMergeAfterMerge;
public event Microsoft.Office.Tools.Word.MailMergeAfterMergeEventHandler MailMergeAfterMerge;
member this.MailMergeAfterMerge : Microsoft.Office.Tools.Word.MailMergeAfterMergeEventHandler
Public Custom Event MailMergeAfterMerge As MailMergeAfterMergeEventHandler
Event Type
Examples
The following code example displays a message when the MailMergeAfterMerge event is raised. To use this example, run it from the ThisDocument
class in a document-level project.
private void DocumentMailMergeAfterMerge()
{
this.MailMergeAfterMerge += new Microsoft.Office.Tools.Word.MailMergeAfterMergeEventHandler(ThisDocument_MailMergeAfterMerge);
}
void ThisDocument_MailMergeAfterMerge(object sender, Microsoft.Office.Tools.Word.MailMergeAfterMergeEventArgs e)
{
MessageBox.Show("Your mail merge on "
+ this.Name + " is now finished.");
}
Private Sub DocumentMailMergeAfterMerge()
AddHandler Me.MailMergeAfterMerge, AddressOf ThisDocument_MailMergeAfterMerge
End Sub
Private Sub ThisDocument_MailMergeAfterMerge(ByVal sender As Object, ByVal e As _
Microsoft.Office.Tools.Word.MailMergeAfterMergeEventArgs)
MessageBox.Show("Your mail merge on " & Me.Name & " is now finished.")
End Sub