API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.AddPages method
Appends blank pages to the document and returns the first page added
Syntax:
Function AddPages(ByVal NumberOfPages As Long) As Page
Parameters:
Name Type Description
NumberOfPages
Long
Remarks:
The AddPages method appends blank pages to the document. The first page added is returned.
Examples:
The following VBA example opens an existing CorelDRAW 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.cdrswitchA.des")
With doc
  .AddPages (1)
  .ActiveLayer.CreateEllipse(0, 3, 5, 1).Fill.UniformColor.CMYKAssign 0, 100, 100, 0
  .Save
End With 
End Sub