Share via


Page.PageType Property

Publisher Developer Reference

Returns a PbPageType constant that represents the page type. Read-only.

Syntax

expression.PageType

expression   A variable that represents a Page object.

Return Value
PbPageType

Remarks

The PageType property value can be one of the following PbPageType constants declared in the Microsoft Office Publisher type library.

pbPageLeftPage
pbPageMasterPage
pbPageRightPage
pbPageScratchPage

Example

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

Visual Basic for Applications
  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

See Also