Save File Problem: HTML format

J

johnny

I've a line as below: ( save file as a HTML format )

ActiveDocument.SaveAs
FileName:="f:\homepage\Leave2004.html",
FileFormat:=wdFormatHTML, _
LockComments:=False, Password:="",
AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False,
SaveFormsData:=False, SaveAsAOCELetter:= _
False

While I ran the line the 2nd time ( ie file name exist ),
a message up( error: 6048 - file in use, retained, please
use a new file name ).

Question: How can I force save the file?

Johnny
 
J

Jezebel

Delete it first, ignoring the error if it doesn't exist.

pFile = "f:\homepage\Leave2004.html"
on error resume next
Kill pFile
on error goto 0
 
J

johnny

Thanks a lot!

-----Original Message-----
Delete it first, ignoring the error if it doesn't exist.

pFile = "f:\homepage\Leave2004.html"
on error resume next
Kill pFile
on error goto 0








.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top