Previous Document Next Document

Object Model Reference : Classes : A : Application : Methods : Application.CreateDocument


Application.CreateDocument

Function CreateDocument() As Document

Description

Member of Application

The CreateDocument method creates a new CorelDRAW document.

VBA example

The following VBA example creates a new CorelDRAW document, adds a colored ellipse to the active layer of the document, and saves the new document with a new name.

Sub DocumentCreate()
 Dim doc As Document
 Set doc = CreateDocument()
 doc.ActiveLayer.CreateEllipse (0, 3, 5, 1).Fill.UniformColor.CMYKAssign 0, 100, 100, 0
 doc.SaveAs "C:\My New Document"
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.