[Tutor] Hoping to benefit from someone's experience...

Hansen, Mike Mike.Hansen at atmel.com
Mon Apr 21 17:52:40 CEST 2008


 

> -----Original Message-----
> From: tutor-bounces at python.org 
> [mailto:tutor-bounces at python.org] On Behalf Of Marc Tompkins
> Sent: Saturday, April 19, 2008 1:46 PM
> To: tutor at python.org
> Subject: Re: [Tutor] Hoping to benefit from someone's experience...
> 

> 
> As you might expect, most of the time is spent in Word.  It 
> would probably be faster if I set Visible = False, but for 
> some reason the macro fails (silently) when I do that, so I 
> just minimize Word instead to cut down on screen refreshes.  
> Also, drive U is a Samba share, so there's network latency to 
> take into account.  Even so, 10,231 files took less than 15 
> minutes to convert, which I can live with.
> 

This isn't Python related, but it might help those who do Word macros.

I think you can use Applications.ScreenUpdating = False at the beginning
of your macro. The macro will run a bit faster. It's essentially hiding
all the updating to the document(s). You should set it back at the end
of your macro: Application.ScreenUpdating = True.

Mike


More information about the Tutor mailing list