Table of contents
TOC
Collapse the table of content
Expand the table of content

MailMerge.ShowWizardEx Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Displays the specified catalog or mail merge wizard in a document.

Syntax

expression. ShowWizardEx( ShowDocumentStep, ShowTemplateStep, ShowDataStep, ShowWriteStep, ShowPreviewStep, ShowMergeStep, MergeType, iStep)

_expression_A variable that represents a MailMerge object.

Parameters

NameRequired/OptionalData TypeDescription
ShowDocumentStepOptionalBooleanNot used in Microsoft Publisher 2007. In previous versions, True (the default) displayed the "Select a merge type" step. False removed the step.
ShowTemplateStepOptionalBooleanThis parameter does not apply to Microsoft Publisher.
ShowDataStepOptionalBooleanNot used in Microsoft Publisher 2007. In previous versions, True (the default) displayed the "Select data source" step. False removed the step.
ShowWriteStepOptionalBooleanNot used in Microsoft Publisher 2007. In previous versions, True (the default) displayed the "Create your publication" step. False removed the step.
ShowPreviewStepOptionalBooleanNot used in Microsoft Publisher 2007. In previous versions, True (the default) displayed the "Preview your publication" step. False removed the step.
ShowMergeStepOptionalBooleanNot used in Microsoft Publisher 2007. In previous versions, True (the default) displayed the "Complete the merge" step. False removed the step.
MergeTypeOptionalPbMergeTypeThe merge type to use. See Remarks for possible values.
iStepOptionalLongThe initial step. See Remarks for information about default values.

Remarks

The MergeType parameter can be one of the PbMergeType constants declared in the Microsoft Publisher type library. The default is pbMergeDefault.

Passing pbMergeDefault for MergeType starts a new mail merge; if the publication is already a merge, it leaves the merge type unchanged.

Passing a merge type that is different from the current publication's merge type changes the publication to that new type of merge, but disconnects the data source. Doing so results in the loss of previously inserted fields when the change is to or from a catalog merge type.

Wizard steps correspond to the sequence of merge task panes in the user interface. If no data source is connected, the merge wizard always starts on the first step (the first task pane). If a data source is connected, the wizard starts on Step 2 by default, unless you use the iStep parameter to specify starting with Step 1 or Step 3.

Example

This example checks whether the Mail Merge Wizard is closed, and if it is, displays it.

Public Sub ShowWizardEx_Example() 
 With ActiveDocument.MailMerge 
 If .WizardState = 0 Then 
 .ShowWizardEx 
 End If 
 End With 
End Sub
© 2018 Microsoft