This documentation is archived and is not being maintained.

PageSizes Collection

Office 2007
Represents the collection of all PageSize objects in the parent Document object, where each PageSize object represents one of the page sizes available in the current Microsoft Office Publisher document.

Version Information
 Version Added:  Publisher 2007

Remarks

The page sizes represented by the PageSizes collection correspond to the icons displayed under Blank Page Sizes in the Page Setup dialog box in the Publisher user interface.

Example

The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the PageSizes collection to get all the page sizes available in the current document and print the list in the Immediate window.

Visual Basic for Applications
Public Sub PageSizes_Example()

    Dim pubPageSizes As Publisher.PageSizes
    Dim pubPageSize As Publisher.PageSize
    
    Set pubPageSizes = ThisDocument.PageSetup.AvailablePageSizes
    For Each pubPageSize In pubPageSizes
        Debug.Print pubPageSize.Name
    Next
    
End Sub



Show: