catalina36
Programmer
I’m trying to use Word from within Visual Basic to print a document. Everything works perfectly the first time I print but all subsequent attempts to print fail. The sequence of events is as follows:
First print: everything is fine.
Second print: Run-time Error 462 – The remote server machine does not exist or is unavailable.
Third & Subsequent prints: Run-time Error 5850 – The specified range is not from the correct document or story.
The two things that I noticed with Error 5850 is that 1) there are multiple instances of Winword open and 2) Debug takes me to the line of code that sets up a table in the word document (ie .ActiveDocument.Tables.Add NumRows:=1, NumColumns:=3, Range:=Selection.Range).
Can anybody help me fix this problem?
TIA
[sig][/sig]
First print: everything is fine.
Second print: Run-time Error 462 – The remote server machine does not exist or is unavailable.
Third & Subsequent prints: Run-time Error 5850 – The specified range is not from the correct document or story.
The two things that I noticed with Error 5850 is that 1) there are multiple instances of Winword open and 2) Debug takes me to the line of code that sets up a table in the word document (ie .ActiveDocument.Tables.Add NumRows:=1, NumColumns:=3, Range:=Selection.Range).
Can anybody help me fix this problem?
TIA
[sig][/sig]