Page 1 of 1

Prevent overwrite file

PostPosted: Mon Jul 28, 2008 7:31 am
by bvdbos
On Oooforum Villeroy gave a sample code to prevent overwriting documents by a macro. However, aren't the properties of StoreAsUrl meant for this:
Code: Select all   Expand viewCollapse view
   Dim FileProperties(0) As New com.sun.star.beans.PropertyValue
FileProperties(0).Name = "Overwrite"
FileProperties(0).Value = False
oDoc2.StoreAsURL(ConvertToURL(bestand),FileProperties())
?

What's the difference, the latter doesn't seem to work?

Re: Prevent overwrite file

PostPosted: Mon Jul 28, 2008 10:28 am
by Villeroy
I don't know what property "Overwrite" is meant for. Can you tell us what it does and why it does not seem to work? Whats wrong with my code, which justs test for existance and raises a MsgBox askin for what to do if file exists?