Page Object [Publisher 2003 VBA Language Reference]
Multiple objects Page Multiple objects |
Represents a page in a publication. The Pages collection contains all the Page objects in a publication.
Using the Page object
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
Properties | Application Property | Background Property | Footer Property | Header Property | Height Property | IgnoreMaster Property | IsLeading Property | IsTrailing Property | IsTwoPageMaster Property | IsWizardPage Property | LayoutGuides Property | Master Property | Name Property | PageID Property | PageIndex Property | PageNumber Property | PageType Property | Parent Property | ReaderSpread Property | RulerGuides Property | Shapes Property | Tags Property | WebPageOptions Property | Width Property | Wizard Property | XOffsetWithinReaderSpread Property | YOffsetWithinReaderSpread Property
Methods | Delete Method | Duplicate Method | ExportEmailHTML Method | Move Method | SaveAsPicture Method
Parent Objects | MasterPages Collection | Page Object | Pages Collection | ReaderSpread Object | View Object
Child Objects | HeaderFooter Object | LayoutGuides Object | Page Object | PageBackground Object | ReaderSpread Object | RulerGuides Object | Shapes Object | Tags Object | WebPageOptions Object | Wizard Object