PageType Property

Microsoft Publisher Visual Basic

constant that represents the page type. Read-only.

PbPageType can be one of these PbPageType constants.
pbPageLeftPage
pbPageMasterPage
pbPageRightPage
pbPageScratchPage

expression.PageType

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example adds a shape on alternating corners of each page in the active publication.

Sub GetPageType()
    Dim pgCount As Page
    For Each pgCount In ActiveDocument.Pages
        If pgCount.PageType = pbPageLeftPage Then
            pgCount.Shapes.AddShape Type:=msoShapeOval, _
                Left:=50, Top:=50, Width:=50, Height:=50
        ElseIf pgCount.PageType = pbPageRightPage Then
            pgCount.Shapes.AddShape Type:=msoShapeOval, _
                Left:=512, Top:=50, Width:=50, Height:=50
        End If
    Next
End Sub