MailMerge.ShowWizard Method (Word)
Displays the Mail Merge Wizard in a document.
Syntax
expression .ShowWizard(InitialState, ShowDocumentStep, ShowTemplateStep, ShowDataStep, ShowWriteStep, ShowPreviewStep, ShowMergeStep)
expression Required. A variable that represents a MailMerge object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
InitialState |
Required |
Variant |
The number of the Mail Merge Wizard step to display. |
ShowDocumentStep |
Optional |
Variant |
True keeps the "Select document type" step in the sequence of mail merge steps. False removes step one. |
ShowTemplateStep |
Optional |
Variant |
True keeps the "Select starting document" step in the sequence of mail merge steps. False removes step two. |
ShowDataStep |
Optional |
Variant |
True keeps the "Select recipients" step in the sequence of mail merge steps. False removes step three. |
ShowWriteStep |
Optional |
Variant |
True keeps the "Write your letter" step in the sequence of mail merge steps. False removes step four. |
ShowPreviewStep |
Optional |
Variant |
True keeps the "Preview your letters" step in the sequence of mail merge steps. False removes step five. |
ShowMergeStep |
Optional |
Variant |
True keeps the "Complete the merge" step in the sequence of mail merge steps. False removes step six. |
Example
This example checks if the Mail Merge Wizard is already displayed 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