Previous Document Next Document
StructSaveAsOptions.Overwrite

Property Overwrite As Boolean

Member of StructSaveAsOptions

The Overwrite property returns or sets wheter an existing file with the specified name is overwritten. The default value of the property is True.

If the file with the given name already exists and this property is set to False, the save operation fails.

The following code example fails while saving the active document if the file file.cdr already exists in the folder C:\Temp:

Sub Test() 
 Dim so As New StructSaveAsOptions 
 so.Overwrite = False 
 ActiveDocument.SaveAs "C:\Temp\File.cdr", so 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.