Previous Document Next Document

Object Model Reference : Classes : D : Document : Methods : Document.AddPagesEx


Document.AddPagesEx

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

Description

Member of Document

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

Parameter
Description
NumberOfPages
Specifies 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

VBA example

The following VBA 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 2013 Corel Corporation. All rights reserved.