Previous Document Next Document

Object Model Reference : Classes : P : Page : Properties : Page.Index


Page.Index

Property Index As Long

Description

Member of Page

The Index property returns the index number of a page.

The Index property returns a read-only value.

VBA example

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

Sub Test()
 Dim p As Page
 Dim s As Shape
 For Each p In ActiveDocument.Pages
  Set s = p.ActiveLayer.CreateArtisticText(p.SizeWidth / 2, 0.5, "- Page " & p.Index & " -")
  s.Text.AlignProperties.Alignment = cdrCenterAlignment
 Next p
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.