Article contributed by Daryl Lucas Many people know they can speed execution of Word Automation by turning off screen updating: Word. Screen Updating = False Many do not know, however, that they can get an even greater speed boost by hiding the application altogether.
Here is an example from a Visual Basic client: In the above example, Word launches but does not appear anywhere on the screen. (It does, though, show up in NT's Task Manager, in its list of running processes.) Despite this apparent lack of response, Word is very active and quite capable of doing everything it is told-creating a new document, inserting the message, , saving the file, closing it, and quitting.
Not only did I see a huge variety in how Excel is being used, you also pointed out various tips and tricks for writing fast VBA code in Excel.
In this post I’m going to share with you the most important performance tips I know about.
You can find a version of this tip for the older menu interface of Excel here: Turning Off Screen Updating.
The functionality depends on Word, not on the Automation client.
But it also works even if you run your Automation code from Word itself.
Word does not need to display itself in order to run.
In the above code, you could omit the lines that create and use the Word.