API Documentation > CorelDRAW > 2025-v26 > Page > IVGPage
Page.Index property
Gets the page number for the referenced page
Syntax:
Property Get Index() As Long
Remarks:
The Index property returns the index number of a page.
Examples:
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