A
AG
I am using Automation from Access 2000 to create a Word 2000 document.
I have searched the web and found other posts, but no real solutions.
Most of the time it works fine, but sometimes I receive error 462, The
remote server machine does not exist or is unavailable.
The first line that generates the error usually contains a call to
InchedToPoints.
However, if I skip over those lines, it will pop up somewhere else, like in
a reference to a document.
Sometimes it happens when Word is already open, and sometimes when it is not
already open.
Task manager does not show any unexpected instances of Word.
If I close Access and reopen it, then everything works fine.
I am using early binding and here is a sample of my code.
Private Function fnWordDoc () as Boolean
Dim appWord As Word.Application
Dim docWord As Word.Document
On Error GoTo ErrLine
Set appWord = GetObject(, "Word.Application")
Set docWord = appWord.Documents.Add
'do my stuff here
fnWordDoc = True
ErrLine:
'clean up all objects
Exit Function
ErrLine:
If Err.Number = 429 Then
Set appWord = New Word.Application '
CreateObject("Word.Application")
Resume Next
Else
'My global error reporter
End If
Resume ExitLine
Any help in eliminating the error would be appreciated.
I have searched the web and found other posts, but no real solutions.
Most of the time it works fine, but sometimes I receive error 462, The
remote server machine does not exist or is unavailable.
The first line that generates the error usually contains a call to
InchedToPoints.
However, if I skip over those lines, it will pop up somewhere else, like in
a reference to a document.
Sometimes it happens when Word is already open, and sometimes when it is not
already open.
Task manager does not show any unexpected instances of Word.
If I close Access and reopen it, then everything works fine.
I am using early binding and here is a sample of my code.
Private Function fnWordDoc () as Boolean
Dim appWord As Word.Application
Dim docWord As Word.Document
On Error GoTo ErrLine
Set appWord = GetObject(, "Word.Application")
Set docWord = appWord.Documents.Add
'do my stuff here
fnWordDoc = True
ErrLine:
'clean up all objects
Exit Function
ErrLine:
If Err.Number = 429 Then
Set appWord = New Word.Application '
CreateObject("Word.Application")
Resume Next
Else
'My global error reporter
End If
Resume ExitLine
Any help in eliminating the error would be appreciated.