MailMergeAfterMergeEventArgs 接口
为 MailMergeAfterMerge 事件提供数据。
命名空间: Microsoft.Office.Tools.Word
程序集: Microsoft.Office.Tools.Word.v4.0.Utilities(在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)
Microsoft.Office.Tools.Word(在 Microsoft.Office.Tools.Word.dll 中)
语法
声明
<GuidAttribute("63e99ffe-3adf-47cc-88b4-bca9fba0d9f0")> _
Public Interface MailMergeAfterMergeEventArgs
[GuidAttribute("63e99ffe-3adf-47cc-88b4-bca9fba0d9f0")]
public interface MailMergeAfterMergeEventArgs
MailMergeAfterMergeEventArgs 类型公开以下成员。
属性
名称 | 说明 | |
---|---|---|
NewDocument | 获取从邮件合并创建的 Microsoft.Office.Interop.Word.Document。 |
页首
示例
下面的代码示例演示 MailMergeAfterMerge 事件的事件处理程序。该事件处理程序在邮件合并中的所有记录成功合并后显示一条消息。
此示例针对的是文档级自定义项。
Private Sub DocumentMailMergeAfterMerge()
AddHandler Me.MailMergeAfterMerge, AddressOf ThisDocument_MailMergeAfterMerge
End Sub
Private Sub ThisDocument_MailMergeAfterMerge(ByVal sender As Object, ByVal e As _
Microsoft.Office.Tools.Word.MailMergeAfterMergeEventArgs)
MessageBox.Show("Your mail merge on " & Me.Name & " is now finished.")
End Sub
private void DocumentMailMergeAfterMerge()
{
this.MailMergeAfterMerge += new Microsoft.Office.Tools.Word.MailMergeAfterMergeEventHandler(ThisDocument_MailMergeAfterMerge);
}
void ThisDocument_MailMergeAfterMerge(object sender, Microsoft.Office.Tools.Word.MailMergeAfterMergeEventArgs e)
{
MessageBox.Show("Your mail merge on "
+ this.Name + " is now finished.");
}