[python-win32] MSWord: Server Busy

Bill Papadopoulos b_papadopoulos at iris.gr
Thu Sep 30 07:51:02 CEST 2004


I do some MSWord programming -if i may call it this way- through Python. I am doing well so far, but the first time I set a margin to a Word document I get a "server busy" message which floads away after ~15 secs. This occurs only to the first Word document that i open. If i open a second Word document this "server busy" message will no longer appear.

After lots of search and tests I have concluded that i must set the clsctx parameter to my Dispatch object which I created in order for my script to wait until the Word Automation Server is initialized. 

I do the Dispatch as follows:

wordApp = Dispatch("Word.Application")

But, I think i must do it like this:

wordApp = Dispatch("Word.Application", clsctx = [clsctx value] )

I have found some values that clsctx accepts (such as: CLSCTX_INPROC_HANDLER = 2 ) but when I set them to the Dispatch (example: Dispatch("Word.Application", clsctx = 2) I get a "No such interface supported".

So, my question, is there any proper way to make my script wait until the Word Automation Server is initialized to avoid getting the "Server Busy" error message?

p.s.This "Server Busy" error message only appears in Win98.

Best Regards

Vax
____________________
b_papadopoulos at iris.gr
vax at cls.gr



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20040930/3b47a7d6/attachment.htm


More information about the Python-win32 mailing list