A
Alan
Sometimes the code below encounters a runtime error (462) at the line
"Word.Application.Visible." That error says: "The remote server
machine does not exist or is not available.
What might cause this error? Alan
Function StartWord() As Boolean
StartWord = False
' Try to open an existing instance of Word
On Error Resume Next
Set Word = GetObject(, "Word.Application")
On Error GoTo 0
' If Word is not started, start a new instance
If Word Is Nothing Then
Set Word = GetObject("", "Word.Application")
End If
Word.Application.Visible = True
StartWord = True
End Function
"Word.Application.Visible." That error says: "The remote server
machine does not exist or is not available.
What might cause this error? Alan
Function StartWord() As Boolean
StartWord = False
' Try to open an existing instance of Word
On Error Resume Next
Set Word = GetObject(, "Word.Application")
On Error GoTo 0
' If Word is not started, start a new instance
If Word Is Nothing Then
Set Word = GetObject("", "Word.Application")
End If
Word.Application.Visible = True
StartWord = True
End Function