Previous Document Next Document
Document.AddPagesEx

Function AddPagesEx(NumberOfPages As Long, Width As Double, Height As Double) As Page

Member of Document

The AddPagesEx method adds pages, with a specified height and width, to a document. The first page added is returned.

Parameters
Description
NumberOfPages
Identifies the number of pages to add to a document
Width
Specifies the width of the pages that are inserted in the document, measured in document units
Height
Specifies the width of the pages that are inserted in the document, measured in document units

The following code example opens an existing CorelDRAW (CDR) document, adds a page to the document that has a width and height of 10 document units, creates a colored ellipse on the new page, and saves the entire document.

Sub DocumentOpen() 
 Dim doc As Document 
 Set doc = OpenDocument("C:\Flower.cdr") 
 With doc 
  .AddPagesEx 1, 10, 10 
  .ActiveLayer.CreateEllipse(0, 3, 5, 
1).Fill.UniformColor.CMYKAssign 0, 100, 100, 0 
  .Save 
 End With 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.