Board index » delphi » "Server Connection Failed" starting Word 97

"Server Connection Failed" starting Word 97

I am getting "Server Connection Failed" message in my application when
it tries to use Word 97 to generate a Word document. The application
does a mail merge and a few field inserts using bookmarks.

It runs fine on most machines, but I have a few machines that get this
error. Are there certain DLLs I need to verify?

Any help is greatly appreciated.

Thanks in advance,
Alex Chen
ac...@aus.teainet.com

 

Re:"Server Connection Failed" starting Word 97


In article <3557027D.80DFE...@austintx.net>, al...@austintx.net says...

Quote

>I am getting "Server Connection Failed" message in my application when
>it tries to use Word 97 to generate a Word document. The application
>does a mail merge and a few field inserts using bookmarks.

>It runs fine on most machines, but I have a few machines that get this
>error. Are there certain DLLs I need to verify?

>Any help is greatly appreciated.

Hi, Alex.

What version of Word97 is it? I got this same error from the Small Business Edition of MS
OFFICE97. It seems to be a brick wall. On the full version, my delphi app will commuinicate just
fine, but the small business edition (which ships with alot of new PCs such as DELL) it doesnt
work, even though both word.basic and word.application are in the registry.

Randy

Re:"Server Connection Failed" starting Word 97


Hey Alex and Randy,

I get the same problem. I have the Professional Microsoft Office 97 product,
that shipped with my Dell. Damn frustrating.

Regards,
Narath Carlile.

Re:"Server Connection Failed" starting Word 97


Hey Guys,

Well our thread seemed to have died an ignominous death, and everyone let us
thrash away in the dark. I even posted to the
microsoft.public.word.programming group and nada.

Anyway, I've kinda figured it out. You have to import the word type library
(word8.olb) or something like that in the same directory as the word exe
(WinWord.exe)

Once you have imported it, the appropriate Class IDs are set, so that you
can create the ole container correctly.

Here is the code I got from someone else in the newsgroup (sorry whoever you
are I lost the citation)

var
 iDocument: Document;
 WordDocInfo : TCreateInfo;
begin
 with WordDocInfo do
 begin
      CreateType := ctNewObject;
      ShowAsIcon := false;
      ClassID := Class_Document;
 end;
  WordContainer.CreateObjectFrominfo(WordDocInfo);
  WordContainer.DoVerb(0); {necessary to create the new file}
  iDocument := WordContainer.OleObjectInterface as Document;
  iDocument.Content.Text := 'Narath was here';
  iDocument.UndoClear;
  iDocument.Saved := true;
end;

Hope it works,
Regards,
Narath Carlile.

Other Threads