Previous Document Next Document

Object Model Reference : Classes : P : PrintSettings : Properties : PrintSettings.PageRange


PrintSettings.PageRange

Property PageRange As String

Description

Member of PrintSettings

The PageRange property specifies which pages to print.

 
For this property to be used, the PrintRange property must be set to prnPageRange.
VBA example

The following VBA example creates a new document containing four pages with page numbers. It then prints pages two and four.

Sub Test()
 Dim doc As Document
 Dim page As page
 Dim DrwPrnSettings As PrintSettings
 Set doc = CreateDocument
 doc.AddPages 4
 For Each page In doc.Pages
  page.ActiveLayer.CreateArtisticText page.SizeWidth / 2, page.SizeHeight / 2, "This is page " & page.Index
 Next page
 Set DrwPrnSettings = ActiveDocument.PrintSettings
 With DrwPrnSettings
  .PrintRange = prnPageRange
  .PageRange = "2,4"
 End With
 doc.PrintOut
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.