Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable screen update in long running word macro?

Tags:

ms-word

vba

I've got a word 2013 macro which is taking quite some time to finish.

The macro is reformatting the document and the Screen keeps updating while the macro is running, which I guess is where word spends most of it's time.

How can I disable screen updating in word in a macro and refresh it when the macro is finished?

like image 273
Sam Avatar asked Dec 27 '22 00:12

Sam


1 Answers

Try with adding this line at the beginning of your code:

Application.ScreenUpdating = False

and this at the end:

Application.ScreenUpdating = True

If this doesn't help you need to add more information and possibly post your code.

like image 199
Kazimierz Jawor Avatar answered Jan 31 '23 01:01

Kazimierz Jawor