Understanding the CorelDRAW object model : Working with documents |
Each open document, or Document object, is a member of the Application.Documents collection. The documents in that collection appear in the order in which they were created or opened.
CorelDRAW provides a number of properties, methods, and events for working with documents, the most useful of which are listed in the following table.
Class
|
Member
|
Description
|
---|---|---|
ActiveView
|
OriginX property
and OriginY property |
Combine to specify the origin of the active view
For more information, see Panning.
|
ActiveView
|
SetViewPoint method
|
Specifies the origin of the active view
For more information, see Panning.
|
ActiveView
|
Zoom property
|
Specifies the zoom factor of the active view
For more information, see Zooming.
|
AddInHook
|
New event
|
Is triggered when a document is created
For more information, see Creating documents.
|
Application
|
ActiveDocument property
|
Provides direct access to the active document
For more information, see Activating documents.
|
Application
|
CreateDocument method
or CreateDocumentFromTemplate method |
Create a document
For more information, see Creating documents.
|
Application
|
DocumentAfterExport event
|
Is triggered when a document is exported (that is, when the Export dialog box closes)
For more information, see Exporting files from documents.
|
Application
|
DocumentAfterPrint event
|
Is triggered when a document is printed (that is, when the Print dialog box closes)
For more information, see Printing documents.
|
Application
|
DocumentAfterSave event
|
Is triggered when a document is saved (that is, when the Save dialog box closes)
For more information, see Saving documents.
|
Application
|
DocumentBeforeExport event
|
Is triggered when the Export dialog box opens
For more information, see Exporting files from documents.
|
Application
|
DocumentBeforePrint event
|
Is triggered when the Print dialog box opens
For more information, see Printing documents.
|
Application
|
DocumentBeforeSave event
|
Is triggered when the Save dialog box opens
For more information, see Saving documents.
|
Application
|
DocumentClose event
|
Is triggered when a document is closed
For more information, see Closing documents.
|
Application
|
DocumentNew event
|
Is triggered when a document is created
For more information, see Creating documents.
|
Application
|
DocumentOpen event
|
Is triggered when a document is opened
For more information, see Opening documents.
|
Application
|
Documents property
|
Contains the collection of open documents
For more information, see Activating documents.
|
Application
|
OpenDocument method
|
Opens a document
For more information, see Opening documents.
|
Application
|
QueryDocumentClose event
|
Is triggered when the user responds to a request to close a document
For more information, see Closing documents.
|
Application
|
QueryDocumentExport event
|
Is triggered when the user responds to a request to export a document
For more information, see Exporting files from documents.
|
Application
|
QueryDocumentPrint event
|
Is triggered when the user responds to a request to print a document
For more information, see Printing documents.
|
Application
|
QueryDocumentSave event
|
Is triggered when the user responds to a request to save a document
For more information, see Saving documents.
|
Application
|
WindowActivate event
|
Is triggered when a window is activated
For more information, see Activating documents.
|
Application
|
WindowDeactivate event
|
Is triggered when a window is deactivated
For more information, see Activating documents.
|
Document
|
Activate method
|
Activates a document
For more information, see Activating documents.
|
Document
|
ActiveWindow property
|
Provides direct access to the active window for a document
For more information, see Working with windows.
|
Document
|
AfterExport event
|
Is triggered when a document is exported (that is, when the Export dialog box closes)
For more information, see Exporting files from documents.
|
Document
|
AfterPrint event
|
Is triggered when a document is printed (that is, when the Print dialog box closes)
For more information, see Printing documents.
|
Document
|
AfterSave event
|
Is triggered when a document is saved (that is, when the Save dialog box closes)
For more information, see Saving documents.
|
Document
|
BeforeExport event
|
Is triggered when the Export dialog box opens
For more information, see Exporting files from documents.
|
Document
|
BeforePrint event
|
Is triggered when the Print dialog box opens
For more information, see Printing documents.
|
Document
|
BeforeSave event
|
Is triggered when the Save dialog box opens
For more information, see Saving documents.
|
Document
|
BeginCommandGroup method
and EndCommandGroup method |
Combine to create a command group that reduces a series of programmed, document-related actions to a single, undoable step
For more information, see Creating command groups for documents.
|
Document
|
Close event
|
Is triggered when a document is closed
For more information, see Closing documents.
|
Document
|
Close method
|
Closes a document
For more information, see Closing documents.
|
Document
|
CreateView method
|
Creates a document view
For more information, see Working with views.
|
Document
|
Export method,
ExportEx method, or ExportBitmap method |
Exports a file from a document
For more information, see Exporting files from documents.
|
Document
|
FilePath property,
FileName property, or FullFileName property |
Specifies the file path or filename (or both) of a saved document
For more information, see Activating documents.
|
Document
|
GetUserArea method
|
Returns information about a document area that the user drags with the mouse
For more information, see Capturing mouse drags.
|
Document
|
GetUserClick method
|
Returns information about a document position that the user clicks with the mouse
For more information, see Capturing mouse clicks.
|
Document
|
Open event
|
Is triggered when a document is opened
For more information, see Opening documents.
|
Document
|
PrintOut method
and PrintSettings property |
Combine to print a document by using the specified settings
For more information, see Printing documents.
|
Document
|
PublishToPDF method
and PDFSettings property |
Combine to publish a document to PDF by using the specified settings
For more information, see Publishing documents to PDF.
|
Document
|
QueryClose event
|
Is triggered when the user responds to a request to close a document
For more information, see Closing documents.
|
Document
|
QueryExport event
|
Is triggered when the user responds to a request to export a document
For more information, see Exporting files from documents.
|
Document
|
QueryPrint event
|
Is triggered when the user responds to a request to print a document
For more information, see Printing documents.
|
Document
|
QuerySave event
|
Is triggered when the user responds to a request to save a document
For more information, see Saving documents.
|
Document
|
ReferencePoint property
|
Specifies the reference point for the document
For more information, see Setting document properties.
|
Document
|
SaveAs method
or Save method |
Saves a document
For more information, see Saving documents.
|
Document
|
Unit property
|
Specifies the unit of measurement for the document
For more information, see Setting document properties.
|
Document
|
WorldScale property
|
Specifies the drawing scale for the document
For more information, see Setting document properties.
|
Document
|
Views property
|
Contains the collection of views for a document
For more information, see Working with views.
|
GlobalMacroStorage
|
DocumentAfterExport event
|
Is triggered when a document is exported (that is, when the Export dialog box closes)
For more information, see Exporting files from documents.
|
GlobalMacroStorage
|
DocumentAfterPrint event
|
Is triggered when a document is printed (that is, when the Print dialog box closes)
For more information, see Printing documents.
|
GlobalMacroStorage
|
DocumentAfterSave event
|
Is triggered when a document is saved (that is, when the Save dialog box closes)
For more information, see Saving documents.
|
GlobalMacroStorage
|
DocumentBeforeExport event
|
Is triggered when the Export dialog box opens
For more information, see Exporting files from documents.
|
GlobalMacroStorage
|
DocumentBeforePrint event
|
Is triggered when the Print dialog box opens
For more information, see Printing documents.
|
GlobalMacroStorage
|
DocumentBeforeSave event
|
Is triggered when the Save dialog box opens
For more information, see Saving documents.
|
GlobalMacroStorage
|
DocumentClose event
|
Is triggered when a document is closed
For more information, see Closing documents.
|
GlobalMacroStorage
|
DocumentNew event
|
Is triggered when a document is created
For more information, see Creating documents.
|
GlobalMacroStorage
|
DocumentOpen event
|
Is triggered when a document is opened
For more information, see Opening documents.
|
GlobalMacroStorage
|
QueryDocumentClose event
|
Is triggered when the user responds to a request to close a document
For more information, see Closing documents.
|
GlobalMacroStorage
|
QueryDocumentExport event
|
Is triggered when the user responds to a request to export a document
For more information, see Exporting files from documents.
|
GlobalMacroStorage
|
QueryDocumentPrint event
|
Is triggered when the user responds to a request to print a document
For more information, see Printing documents.
|
GlobalMacroStorage
|
QueryDocumentSave event
|
Is triggered when the user responds to a request to save a document
For more information, see Saving documents.
|
GlobalMacroStorage
|
WindowActivate event
|
Is triggered when a window is activated
For more information, see Activating documents.
|
GlobalMacroStorage
|
WindowDeactivate event
|
Is triggered when a window is deactivated
For more information, see Activating documents.
|
View
|
Activate method
|
Applies a saved view to the document window
For more information, see Working with views.
|
Window
|
Activate method
|
Activates a document window
For more information, see Working with windows.
|
Window
|
ActiveView property
|
Provides direct access to the active view for a document window
For more information, see Working with views.
|
Window
|
Close method
|
Closes a document window
For more information, see Working with windows.
|
Window
|
NewWindow method
|
Creates a document window
For more information, see Working with windows.
|
Window
|
Next property
|
Accesses the next window for a document
For more information, see Working with windows.
|
Window
|
Previous property
|
Accesses the previous window for a document
For more information, see Working with windows.
|
• |
For detailed information on any property, method, or event, see the Object Model Reference.
|
For more information on document-related activities, see the following subtopics:
• |
• |
• |
• |
• |
• |
• |
• |
• |
• |
• |
• |
• |
Files of all supported formats can be imported. Imported files are placed on document layers, so
information on importing files is provided in the section on working with layers (see Importing files into
layers) rather than in this section on working with documents.
|
Copyright 2013 Corel Corporation. All rights reserved.