Pages object (Publisher)

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


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



See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.