MailMergeWizardStateChangeEventHandler 委托

表示处理 DocumentMailMergeWizardStateChange 事件的方法。

命名空间:  Microsoft.Office.Tools.Word
程序集:   Microsoft.Office.Tools.Word(在 Microsoft.Office.Tools.Word.dll 中)
  Microsoft.Office.Tools.Word.v4.0.Utilities(在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

语法

声明
Public Delegate Sub MailMergeWizardStateChangeEventHandler ( _
    sender As Object, _
    e As MailMergeWizardStateChangeEventArgs _
)
public delegate void MailMergeWizardStateChangeEventHandler(
    Object sender,
    MailMergeWizardStateChangeEventArgs e
)

参数

备注

当创建 MailMergeWizardStateChangeEventHandler 委托时,将标识处理事件的方法。若要使该事件与事件处理程序相关联,请将该委托的一个实例添加到事件中。每当事件出现时就调用事件处理程序,直到移除该委托。有关委托的更多信息,请参见事件和委托

示例

下面的代码示例演示 MailMergeWizardStateChange 事件的事件处理程序。该事件处理程序在每次用户在**“邮件合并”**向导中前进至下一步时显示一条消息。

此示例针对的是文档级自定义项。

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.");
}

请参见

参考

Microsoft.Office.Tools.Word 命名空间