urgent help in WORD 10.0 object
Hi,
I have a peculiar problem. I am using Word 10.0 object, to do some functionality of converting txt files to doc files and some doc files to txt files. All my code is working perfectly, if i run it once, but if i run it second time i am getting an error saying
"Run time error '462' :
The remote server machine does not exist or unavailable"
if i close the application, and if i complie and run it again, it works perfectly for the same input. please help me.
urgent help in WORD 10.0 object
yes i did, even then it is not working.
urgent help in WORD 10.0 object --resolved
Thanks very much Bruce. I think i solved the problem. used app.Quit and app = nothing on Form_Unload() function. it is working. Of course, it is by fluke, i did this. i don't know why it was not working and when i did as the way below.
Code:
Dim wordapp as Word.Application
....
....
....
Private Sub cmd_Click()
Set wordapp = New Wrod.Application
....functions calls that uses wordapp object
....
....
If IsObjectValid(wordapp) Then
wordapp.Quit
set wordapp = Nothing
End If
End Sub
Do you have any idea why the above code does not work??