Previous Document Next Document
Document.SaveAs

Sub SaveAs(FileName As String, [Options As StructSaveAsOptions])

Member of Document

The SaveAs method allows you to save the document to a different file and specify additional options through the StructSaveAsOptions object.

Parameters
Description
FileName
Specifies the name the document you are saving
Options
Specifies the save options of the document
This parameter is optional, and its default value is Nothing.

The following code example saves the document to the original file if the document has been modified. It then creates a copy of the document, saving it in the CorelDRAW 9 file format.

Sub Test() 
 Dim opt As New StructSaveAsOptions 
 If ActiveDocument.Dirty Then ActiveDocument.Save 
 opt.EmbedICCProfile = False 
 opt.EmbedVBAProject = True 
 opt.Filter = cdrCDR 
 opt.IncludeCMXData = False 
 opt.Overwrite = True 
 opt.Range = cdrAllPages 
 opt.ThumbnailSize = cdr10KColorThumbnail 
 opt.Version = cdrVersion9 
 ActiveDocument.SaveAs "C:\Image9.cdr", opt 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.