Object Model Reference : Classes : D : Document : Methods : 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.
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 |
Copyright 2013 Corel Corporation. All rights reserved.