DocumentBase.MailMergeAfterMerge Event
Occurs after all records in a mail merge have merged successfully.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public Event MailMergeAfterMerge As MailMergeAfterMergeEventHandler
public event MailMergeAfterMergeEventHandler MailMergeAfterMerge
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 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
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.");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.