[python-win32] MSWord: Server Busy
Fabricio Guzman
fguzman_slotown at yahoo.com
Thu Sep 30 18:24:06 CEST 2004
How about trapping the error with a try block:
bWorked = false
while bWorked == false
try
wordApp.ActiveDocument.PageSetup.TopMargin = 5
bWorked = true
catch
it's not pretty but it will try and try until the
server is finished initializing.
-Fabricio
--- Bill Papadopoulos <b_papadopoulos at iris.gr> wrote:
>
> >>Hi !
>
> >>"server busy" c'est souvent du au temps de
> lancement de ms-word
> >> "server busy" it's often because ms-word is slow
> to begin to run.
> >>Ajoute/Add "time.sleep(5)"
> >>Michel Claveau
>
>
> Hello Michael and thank your for responding,
>
> This is what I do before I get the "Server Busy"
> message:
>
> #Setting TopMargin
> wordApp.ActiveDocument.PageSetup.TopMargin = 5
>
> where wordApp is my Dispatch object.
>
>
> I 've already tried time.sleep() after setting the
> Margin which resulted
> to a "server busy" message and then the script
> "slept".
>
> Also, I tried time.sleep() before setting the Margin
> which resulted
> to make the script wait and then to get the "server
> busy" message.
>
> I need something like:
>
> while waiting for margin to be set:
> time.sleep()
>
> Any suggestions?
> Anyway, thanks again!
>
>
> Vax
> ____________________
> b_papadopoulos at iris.gr
> vax at cls.gr
>
>
>
> > _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
More information about the Python-win32
mailing list