Adds the specified new wizard page to a specified location in a publication.
expression.AddWizardPage(After, PageType)
expression Required. An expression that returns one of the objects in the Applies To list.
After Required Long. The page after which to place the new wizard page.
PageType Optional PbWizardPageType. The type of wizard page to add.
PbWizardPageType can be one of these PbWizardPageType constants. |
pbWizardPageTypeCatalogBlank |
pbWizardPageTypeCatalogCalendar |
pbWizardPageTypeCatalogEightItemsOneColumn |
pbWizardPageTypeCatalogEightItemsTwoColumns |
pbWizardPageTypeCatalogFeaturedItem |
pbWizardPageTypeCatalogForm |
pbWizardPageTypeCatalogFourItemsAlignedPictures |
pbWizardPageTypeCatalogFourItemsOffsetPictures |
pbWizardPageTypeCatalogFourItemsSquaredPictures |
pbWizardPageTypeCatalogOneColumnText |
pbWizardPageTypeCatalogOneColumnTextPicture |
pbWizardPageTypeCatalogTableOfContents |
pbWizardPageTypeCatalogThreeItemsAlignedPictures |
pbWizardPageTypeCatalogThreeItemsOffsetPictures |
pbWizardPageTypeCatalogThreeItemsStackedPictures |
pbWizardPageTypeCatalogTwoColumnsText |
pbWizardPageTypeCatalogTwoColumnsTextPicture |
pbWizardPageTypeCatalogTwoItemsAlignedPictures |
pbWizardPageTypeCatalogTwoItemsOffsetPictures |
pbWizardPageTypeNewsletter3Stories |
pbWizardPageTypeNewsletterCalendar |
pbWizardPageTypeNewsletterOrderForm |
pbWizardPageTypeNewsletterResponseForm |
pbWizardPageTypeNewsletterSignupForm |
pbWizardPageTypeNone default |
pbWizardPageTypeWebCalendar |
pbWizardPageTypeWebEvent |
pbWizardPageTypeWebPriceList |
pbWizardPageTypeWebRelatedLinks |
pbWizardPageTypeWebSpecialOffer |
pbWizardPageTypeWebStory |
You can only add wizard pages 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.
This example creates a new catalog publication and adds the wizard calendar page after the first page of the catalog.
Sub AddNewWizardPage()
Dim PubApp As Publisher.Application
Dim PubDoc As Publisher.Document
Set PubApp = New Publisher.Application
Set PubDoc = PubApp.NewDocument(Wizard:=pbWizardCatalogs, _
Design:=7)
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.
Sub InsertCatalogWizardPage()
With ActiveDocument
If InStr(1, .Wizard.Name, "Catalog") > 0 Then
.Pages.AddWizardPage After:=1, _
PageType:=pbWizardPageTypeCatalogForm
End If
End With
End Sub