<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-7">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2>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.</FONT></DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>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. </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I do the Dispatch as follows:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>wordApp = Dispatch("Word.Application")</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>But, I think i must do it like this:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>wordApp = Dispatch("Word.Application", clsctx = [clsctx value] 
)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I have found some values that clsctx accepts (such as: 
CLSCTX_INPROC_HANDLER&nbsp;= 2 ) but when I set them to the Dispatch (example: 
Dispatch("Word.Application", clsctx = 2) I get a "No such interface 
supported".</DIV>
<DIV>&nbsp;</DIV>
<DIV>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?</DIV>
<DIV>&nbsp;</DIV>
<DIV>p.s.This "Server Busy" error message only appears in Win98.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Best Regards</DIV>
<DIV>&nbsp;</DIV>
<DIV>Vax</DIV></FONT></DIV></FONT></DIV>
<DIV><FONT size=2>____________________<BR><A 
href="mailto:b_papadopoulos@iris.gr">b_papadopoulos@iris.gr</A><BR><A 
href="mailto:vax@cls.gr">vax@cls.gr</A></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2><BR></FONT>&nbsp;</DIV></BODY></HTML>