DocumentBase.MailMergeWizardStateChange Event

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

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 MailMergeWizardStateChange As MailMergeWizardStateChangeEventHandler
public event MailMergeWizardStateChangeEventHandler MailMergeWizardStateChange

Remarks

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

Examples

The following code example displays a message each time you advance to the next step in the Mail Merge Wizard. To use this example, run it from the ThisDocument class in a document-level project.

Private Sub DocumentMailMergeWizardStateChange()
    AddHandler Me.MailMergeWizardStateChange, AddressOf ThisDocument_MailMergeWizardStateChange
End Sub

Private Sub ThisDocument_MailMergeWizardStateChange(ByVal sender As Object, ByVal e As Microsoft.Office.Tools.Word.MailMergeWizardStateChangeEventArgs)
    MessageBox.Show("Wizard has moved to next step.")
End Sub
private void DocumentMailMergeWizardStateChange()
{
    this.MailMergeWizardStateChange += new Microsoft.Office.Tools.Word.MailMergeWizardStateChangeEventHandler(ThisDocument_MailMergeWizardStateChange);
}

void ThisDocument_MailMergeWizardStateChange(object sender, Microsoft.Office.Tools.Word.MailMergeWizardStateChangeEventArgs e)
{
    MessageBox.Show("Wizard has moved to next step.");
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace