Previous Document Next Document
StructExportOptions.Overwrite

Property Overwrite As Boolean

Member of StructExportOptions

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

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

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

Sub Test() 
 Dim opt As New StructExportOptions 
 Dim flt As ExportFilter 
 opt.Overwrite = False 
 Set flt = ActiveDocument.ExportEx("C:\Temp\img.gif", cdrGIF, 
cdrCurrentPage, opt) 
 flt.Finish 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.