Application object and replace them with invisibility lines: Notice that you want to put the Word. Visible = True line in an error-handler or in a spot where you know it will be run if something goes awry. (If you do get stuck with an invisible Word in the middle of a crash, you can launch the Task Manager and kill the WINWORD.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.You can verify this by launching Word the old-fashioned way and opening File1 at the bottom of the File menu after running the sample code.
The problem is that it is VERY SLOW because the file is huge… ” This is a known problem: doing things cell by cell in Excel is a slow operation.
The Excel object model provides two ways to speed up the code.
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.
The functionality depends on Word, not on the Automation client.But it also works even if you run your Automation code from Word itself.