Object Model Reference : Classes : D : Document : Properties : Document.Pages |
Property Pages As Pages
Member of Document
The Pages property returns the Pages collection, which represents all pages in the document.
The Pages property returns a read-only value.
The following VBA example creates black rectangles at the bottom of each page starting from the current page to the end of the document.
Sub Test() |
Dim idx As Long, i As Long |
Dim doc As Document |
Dim p As Page |
Dim s As Shape |
Set doc = ActiveDocument |
idx = doc.ActivePage.Index |
For i = idx To doc.Pages.Count |
Set p = doc.Pages(i) |
Set s = p.ActiveLayer.CreateRectangle(0, 0, p.SizeWidth, 0.5) |
s.Fill.UniformColor.CMYKAssign 0, 0, 0, 100 |
Next i |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.