Previous Document Next Document

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


PageSize.Index

Property Index As Long

Description

Member of PageSize

The Index property returns the index number for a paper type.

The Index property returns a read-only value.

VBA example

The following VBA example displays the names of all page sizes, and their index numbers, if the paper type is predefined.

Sub Test()
 Dim ps As PageSizes
 Dim d As Document
 Dim p As PageSize
 Dim st As String
 Dim s As Shape
 Set d = CreateDocument
 Set ps = d.PageSizes
 For Each p In ps
  If p.BuiltIn Then
   st = st & p.Name & "(" & p.Index & ")" & vbCr
  End If
 Next p
 Set s = d.ActiveLayer.CreateParagraphText(8.5, 11, 0, 0, st)
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.