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

Pages.AddWizardPage Method (Publisher)

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

Adds the specified new wizard page to a specified location in a publication.


expression. AddWizardPage( After, PageType, AddHyperlinkToWebNavBar)

_expression_A variable that represents a Pages object.


NameRequired/OptionalData TypeDescription
AfterRequiredLongThe page after which to place the new wizard page.
PageTypeOptionalPbWizardPageTypeThe type of wizard page to add.
AddHyperlinkToWebNavBarOptionalBooleanSpecifies whether a link to the new page will be added to the automatic navigation bars of existing pages. Default is False, which means that if this argument is omitted, links to this page will not be added to the automatic navigation bars of existing pages.


You can add wizard pages only to similar wizard publications. For example, you can add a Catalog Calendar Wizard page to a catalog but not to a newsletter. An error occurs if you try to add a wizard page to a different type of publication.

The PageType parameter can be one of the PbWizardPageType constants declared in the Microsoft Publisher type library.


This example creates a new catalog publication, adds the wizard calendar page after the first page of the catalog, and adds the page as a link to each Web navigation bar set of the publication.

Sub AddNewWizardPage() 
 Dim PubApp As Publisher.Application 
 Dim PubDoc As Publisher.Document 
 Set PubApp = New Publisher.Application 
 Set PubDoc = PubApp.NewDocument(Wizard:=pbWizardCatalogs, _ 
 PubDoc.Pages.AddWizardPage After:=1, _ 
 PageType:=pbWizardPageTypeCatalogCalendar, _ 
 PubApp.ActiveWindow.Visible = True 
End Sub

This example verifies that the active document is a catalog and, if it is, adds a catalog form after the first page but does not add the page as a link in any Web navigation bar sets.

Sub InsertCatalogWizardPage() 
 With ActiveDocument 
 If .Wizard.ID = 161 Then 
 .Pages.AddWizardPage After:=1, _ 
 PageType:=pbWizardPageTypeCatalogForm, _ 
 End If 
 End With 
End Sub
© 2018 Microsoft