Previous Document Next Document
Document.AddPages

Function AddPages(NumberOfPages As Long) As Page

Member of Document

The AddPages method appends blank pages to the document. The first page added is returned.

Parameters
Description
NumberOfPages
Specifies the number of pages to add to a document

The following code example opens an existing CorelDRAW (CDR) document, adds a page to the document, 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 
  .AddPages (1) 
  .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.