Share via


State Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

WdMailMergeState

WdMailMergeState can be one of these WdMailMergeState constants.
wdDataSource
wdMainAndDataSource
wdMainAndHeader
wdMainAndSourceAndHeader
wdMainDocumentOnly
wdNormalDocument

expression.State

expression   Required. An expression that returns 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