Remote Server is unavailable

O

Owen Crater

I get an error message of 462, remote server machine does
not exist or is unavailable. The situation is that I am
using VB6 to open up Word, open a new document and import
data from a database. It works perfectly the first time
through. When I try to run it a second time, regardless of
the parameters ( different person's data, or using data
from a different day, it always hangs on a line that has
an InchesToPoints formatting statement.
".Selection.ParagraphFormat.TabStops.Add
Position:=InchesToPoints(1.25)" or
".ActiveDocument.PageSetup.LeftMargin = InchesToPoints
(0.75)"
I start the procedure with
Set wApp = CreateObject("Word.Application")
Set thisDoc = wApp.Documents.Add

and end with

thisDoc.Close
set thisDoc = Nothing
wApp.Quit
set wApp = Nothing

Remember, the program works perfectly the first time
through, but not the second. It even prints the first
paragraph of information from the database. It is when it
hits that paragraph formating for the second paragraph
that it hangs.
 
Top