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

See also

MailMerge Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.