DocumentBase.MailMergeWizardStateChange 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当用户在“邮件合并向导”中从指定的步骤切换到另一个指定步骤时发生。
public:
event Microsoft::Office::Tools::Word::MailMergeWizardStateChangeEventHandler ^ MailMergeWizardStateChange;
public event Microsoft.Office.Tools.Word.MailMergeWizardStateChangeEventHandler MailMergeWizardStateChange;
member this.MailMergeWizardStateChange : Microsoft.Office.Tools.Word.MailMergeWizardStateChangeEventHandler
Public Custom Event MailMergeWizardStateChange As MailMergeWizardStateChangeEventHandler
事件类型
示例
下面的代码示例在每次进入 邮件合并向导中的下一步时显示一条消息。 若要使用此示例,请从文档级项目中的 ThisDocument
类运行它。
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.");
}
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
注解
Handled将提供的 MailMergeWizardStateChangeEventArgs 的 属性设置为 false
,使用户保留在当前步骤中。