PDA

View Full Version : VB COM using Word Application


SAMLI
01-19-2004, 10:10 PM
Can any one help out of this problem?

We have a VB COM application that calls Word application to generate Word document. This COM worked well until the Service Pack 4 for Windows 2000 was installed on the server a week ago.

Now the Word applicaiton object cannot be created properly, and the error in our log says, "The remote server machine does not exist or is unavailable"

The following is the code to create the Word object (this part of code worked without any problem until last week!!):

-----------------------------------------------------------------
Option Explicit

Public Wd As Word.Application
Public ThisDoc As Word.Document
Public DocSavePath As String
Public filename As String

Function PrepareWord()

Wd.Quit
Set Wd = New Word.Application
Set ThisDoc = Wd.Documents.Add

' Generate the Word doc
' ........

ThisDoc.SaveAs filename:=DocSavePath & filename
Wd.Quit

End Function
---------------------------------------------------------------------
Thanks a lot for any help.