J
jimi
Hi
I'm writing a little script to convert a RTF file to a write-protected
DOC file. All works great, except if the DOC file already exists. I'd
like the script to assume that it should overwrite the existing file,
but I can't find where to do this! Here's my script so far:
-----
dim appWord
dim docWord
On Error Resume Next
Set appWord = CreateObject("Word.Application")
appWord.DisplayAlerts = False
Set docWord = appWord.Documents.Open("C:\temp\RTFTest.rtf")
docWord.SaveAs "C:\temp\RTFTest.doc", wdFormatDocument, , , , "test"
docWord.Close False
Set docWord = Nothing
appWord.Quit
Set appWord = Nothing
-----
Any ideas on what to do to this script to make Word assume the
overwrite the second time I run the script (ie. if C:\temp\RTFTest.doc
already exists).
Thanks
Jimi
I'm writing a little script to convert a RTF file to a write-protected
DOC file. All works great, except if the DOC file already exists. I'd
like the script to assume that it should overwrite the existing file,
but I can't find where to do this! Here's my script so far:
-----
dim appWord
dim docWord
On Error Resume Next
Set appWord = CreateObject("Word.Application")
appWord.DisplayAlerts = False
Set docWord = appWord.Documents.Open("C:\temp\RTFTest.rtf")
docWord.SaveAs "C:\temp\RTFTest.doc", wdFormatDocument, , , , "test"
docWord.Close False
Set docWord = Nothing
appWord.Quit
Set appWord = Nothing
-----
Any ideas on what to do to this script to make Word assume the
overwrite the second time I run the script (ie. if C:\temp\RTFTest.doc
already exists).
Thanks
Jimi