WizardState Property

Microsoft Word Visual Basic

expression.WizardState

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example checks if the Mail Merge Wizard is already displayed in the active document and if it is, moves to the Mail Merge Wizard's sixth step and removes the fifth step from the Wizard.

Sub ShowMergeWizard()
    With ActiveDocument.MailMerge
        If .WizardState > 0 Then
            .ShowWizard InitialState:=6, ShowPreviewStep:=False
        End If
    End With
End Sub