I am accessing Word through VBA from access. I get the following message:
Error 462: The remote server machine does not exist or is unavailable.
It stops on the line setdocorig = documents.open
Can anyone tell me why I get this message? If I go out of the program, and back into it, it works just fine. But after I run it once, and I just close the form, it does not work just fine. What type of error should I be looking for?
Error 462: The remote server machine does not exist or is unavailable.
It stops on the line setdocorig = documents.open
Code:
Dim wd As Word.Application
Dim docOrig As Word.Document
Set wd = CreateObject("word.application")
Do While Not rstTemp.EOF() 'rstTemp created earlier in the program
setDocName = rstTemp!filename
set docOrig = Documents.Open(Filename:=strDocName, ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:="")
'some code here to get the customdocumentproperties (this part works)
blah blah blah
rstTemp.movenext
Loop
docorig.close
wd.quit
Can anyone tell me why I get this message? If I go out of the program, and back into it, it works just fine. But after I run it once, and I just close the form, it does not work just fine. What type of error should I be looking for?