C
cas4
I'm automating Word in a VB6 application. I'm opening the word document, makeing changes, then calling the document's SaveAs command. I get a Word error message (that I cannot trap using an "on error goto" statement), and the vb app crashes and quits with Word still residing in Memory. I'm compiliing the app on a machine with OfficeXP and running it on a machine with Office2k, but the SaveAs command is backwards compatible, isn't it? Below is the code I'm using to open and save the document, if anyone has had a problem with this command, please let me know. Thanks!
===========================================
Set Wordapp = New Word.Application
Set doc = Wordapp.Documents.Add(filename)
..
..
'modify the doc code
..
..
doc.SaveAs newfilename <- Word crashes when this line is executed
===========================================
Set Wordapp = New Word.Application
Set doc = Wordapp.Documents.Add(filename)
..
..
'modify the doc code
..
..
doc.SaveAs newfilename <- Word crashes when this line is executed