Previous Document Next Document

Object Model Reference : Classes : P : Pages : Properties : Pages.Item


Pages.Item

Property Item(Index As Long) As Page

Description

Member of Pages

The Item property returns a specified page from a document.

Item is the default property of the Pages class, and its reference can be omitted when you are accessing items in a Pages collection. For example, Pages.Item(2) is the same as Pages(2) — they both reference the second page in the collection.

 
A page with an index number of 0 returns the master page. Some layers, such as Guides or Grid, are available only on the master page.

The Item property returns a read-only value.

Parameter
Description
Index
Specifies the page by its index number

VBA example

The following VBA example places page numbers on each page in the active document.

Sub Test()
 Dim p As Page
 Dim i As Long
 For i = 1 To ActiveDocument.Pages.Count
  Set p = ActiveDocument.Pages(i)
  p.ActiveLayer.CreateArtisticText 0, 0, "Page " & p.Index
 Next i
End Sub
Sub Test()
 Dim p As Page
 For Each p In ActiveDocument.Pages
  p.ActiveLayer.CreateArtisticText 0, 0, "Page " & p.Index
 Next p
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.