Application.MailMergeWizardStateChange Event
Word Developer Reference |
Occurs when a user changes from a specified step to a specified step in the Mail Merge Wizard.
Syntax
expression.Private Sub object_MailMergeWizardStateChange(ByVal Doc As Document, FromState As Long, ToState As Long, Handled As Boolean)
expression A variable that represents an Application object that has been declared with events in a class module. For information about using events with the Application object, see Using Events with the Application Object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Doc | Required | Document | The mail merge main document. |
FromState | Required | Long | The Mail Merge Wizard step from which a user is moving. |
ToState | Required | Long | The Mail Merge Wizard step to which a user is moving. |
Handled | Required | Boolean | True moves the user to the next step. False for the user to remain at the current step. |
Example
This example displays a message when a user moves from step three of the Mail Merge Wizard to step four. Based on the answer to the message, the user will either move to step four or remain at step three. This example assumes that you have declared an application variable called MailMergeApp in your general declarations and have set the variable equal to the Word Application object.
Visual Basic for Applications |
---|
|
See Also