"合并" 状态属性 (Word)MailMerge.State property (Word)

返回邮件合并操作的当前状态。Returns the current state of a mail merge operation. 只读的WdMailMergeStateRead-only WdMailMergeState.

语法Syntax

expression.expression. State

_表达式_是必需的。expression Required. 一个代表 "邮件合并" 对象的变量。A variable that represents a 'MailMerge' object.

示例Example

如果活动文档是一个带有附加数据源的主文档,则本示例执行邮件合并。This example executes a mail merge if the active document is a main document with an attached data source.

Set myMerge = ActiveDocument.MailMerge 
If myMerge.State = wdMainAndDataSource Then myMerge.Execute

另请参阅See also

MailMerge 对象MailMerge Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.