Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Document.MailMergeWizardStateChange Event

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Occurs when a user changes from a specified step to a specified step in the Mail Merge Wizard.

Namespace:  Microsoft.Office.Tools.Word
Assemblies:   Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
event MailMergeWizardStateChangeEventHandler MailMergeWizardStateChange

Set the Handled property of the provided MailMergeWizardStateChangeEventArgs to false to have the user remain at the current step.

The following code example displays a message each time you advance to the next step in the Mail Merge Wizard. This example is for an application-level add-in.

private void DocumentMailMergeWizardStateChange()
{
    Document vstoDoc = Globals.Factory.GetVstoObject(this.Application.ActiveDocument);
    vstoDoc.MailMergeWizardStateChange += new Microsoft.Office.Tools.Word.MailMergeWizardStateChangeEventHandler(ThisDocument_MailMergeWizardStateChange);
}

void ThisDocument_MailMergeWizardStateChange(object sender, Microsoft.Office.Tools.Word.MailMergeWizardStateChangeEventArgs e)
{
    System.Windows.Forms.MessageBox.Show("Wizard has moved to next step.");
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.