C
Christof
The previuous message got fired too quickly. Another try:
Gents,
I get the following behaviour:
In a macro, I open a word doc, and close it again with
the following code:
'open word document
Dim infoDocument As Object
Set infoDocument = CreateObject("Word.Basic")
On Error Resume Next
Set infoDocument = Word.Documents.Open(fileAddress,0,
True, False)
If Err.Number = 0 Then
'do some stuff
end if
'Close the document
infoDocument.Close
If Word.Documents.Count = 0 Then
Word.Application.Quit
End If
The problem is now that the first time after the excel
file is opened, the macro works fine. From the second
time on, it stops working with the following error:
'The remote server machine does not exsist or is
unavailable. From VBAProject'
Can anybody explain/improve my code.
regards,
Christof
Gents,
I get the following behaviour:
In a macro, I open a word doc, and close it again with
the following code:
'open word document
Dim infoDocument As Object
Set infoDocument = CreateObject("Word.Basic")
On Error Resume Next
Set infoDocument = Word.Documents.Open(fileAddress,0,
True, False)
If Err.Number = 0 Then
'do some stuff
end if
'Close the document
infoDocument.Close
If Word.Documents.Count = 0 Then
Word.Application.Quit
End If
The problem is now that the first time after the excel
file is opened, the macro works fine. From the second
time on, it stops working with the following error:
'The remote server machine does not exsist or is
unavailable. From VBAProject'
Can anybody explain/improve my code.
regards,
Christof