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

Page Object (Publisher)

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

Represents a page in a publication. The Pages collection contains all the Page objects in a publication.

Example

Use Pages (index) to return a single Page object. The following example adds new text to the first shape on the first page in the active publication.

Sub AddPageNumberField() 
 With ActiveDocument.Pages(1).Shapes(1).TextFrame.TextRange 
 .InsertAfter " This text is added after the existing text." 
 .Font.Size = 15 
 End With 
End Sub

Use the FindBypageID property to locate a Page object using the application assigned page ID. Use the Add method to create a new page and add it to the publication. The following example adds a new page to the active publication and then looks for that page using the page ID.

Sub FindPage() 
 Dim lngPageID As Long 

 'Get page ID 
 lngPageID = ActiveDocument.Pages.Add(Count:=1, After:=1).PageID 

 'Use page ID to add a new shape to the page 
 ActiveDocument.Pages.FindByPageID(PageID:=lngPageID) _ 
 .Shapes.AddShape Type:=msoShape5pointStar, _ 
 Left:=200, Top:=72, Width:=50, Height:=50 

End Sub

Methods

Name
Delete
Duplicate
ExportEmailHTML
Move
SaveAsPicture

Properties

Name
Application
Background
Footer
Header
Height
IgnoreMaster
IsLeading
IsTrailing
IsTwoPageMaster
IsWizardPage
LayoutGuides
Master
Name
PageID
PageIndex
PageNumber
PageType
Parent
ReaderSpread
RulerGuides
Shapes
Tags
WebPageOptions
Width
Wizard
XOffsetWithinReaderSpread
YOffsetWithinReaderSpread
© 2017 Microsoft