Pages Collection [Publisher 2003 VBA Language Reference]
Document![]() ![]() ![]() ![]() ![]() ![]() |
Represents all the pages in a publication. The Pages collection contains all the Page objects in a publication.
Using the Pages collection
Use the Add method to add a new page to a publication. The following example adds a new page and a shape to the active publication.
Sub AddPageAndShape()
With ActiveDocument.Pages.Add(Count:=1, After:=1)
With .Shapes.AddShape(Type:=msoShape5pointStar, _
Left:=72, Top:=72, Width:=50, Height:=50)
.Fill.ForeColor.RGB = RGB(Red:=128, Green:=50, Blue:=255)
.Line.ForeColor.RGB = RGB(Red:=75, Green:=50, Blue:=255)
End With
End With
End Sub
Properties | Application Property | Count Property | Item Property | Parent Property
Methods | Add Method | AddWizardPage Method | FindByPageID Method
Parent Objects | Document
Child Objects | HeaderFooter | LayoutGuides | Page | PageBackground | ReaderSpread | RulerGuides | Shapes | Tags | WebPageOptions | Wizard