Understanding the CorelDRAW object model : Working with documents : Saving documents |
Two methods can be used for saving documents: Document.SaveAs and Document.Save.
The Document.SaveAs method saves a document by using the specified file path and filename. You can use this method to save a previously unsaved document or to save an existing document to a different file.
• |
The Document.SaveAs method provides an optional parameter that lets you access the
StructSaveAsOptions class to specify additional settings.
|
The Document.Save method saves over an existing document file that is, by using the existing file path and filename for the document.
If you want, you can use event handlers to respond to events that are triggered by opening the Save dialog box:
• |
Application.DocumentBeforeSave
|
• |
Document.BeforeSave
|
• |
GlobalMacroStorage.DocumentBeforeSave
|
You can also use event handlers to respond to events that are triggered by saving a document and closing the Save dialog box:
• |
Application.DocumentAfterSave
|
• |
Document.AfterSave
|
• |
GlobalMacroStorage.DocumentAfterSave
|
Finally, you can also use event handlers to respond to events that are triggered when the user responds to a request to save a document:
• |
Application.QueryDocumentSave
|
• |
Document.QuerySave
|
• |
GlobalMacroStorage.QueryDocumentSave
|
Copyright 2013 Corel Corporation. All rights reserved.