MailMergeBeforeMerge Event
This documentation is archived and is not being maintained.

Document.MailMergeBeforeMerge Event

Occurs when a merge is executed, before any records merge.

Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in

public event EventHandler MailMergeBeforeMerge

To stop the mail merge process, set the Cancel argument of the provided CancelEventArgs to true.

The following code example displays a message before any manual mail merge is run.

private void DocumentMailMergeBeforeMerge()
    this.MailMergeBeforeMerge += new EventHandler(ThisDocument_MailMergeBeforeMerge);

void ThisDocument_MailMergeBeforeMerge(object sender, EventArgs e)
    MessageBox.Show("Your mail merge on "
        + this.Name + " is now starting.");

© 2016 Microsoft