Pplication screenupdating false
Range Dim o Frm As frm Progress Dim Portion Done As Double On Error Go To Err_Exit str Text To Insert = "Annual bonus rates for the last five years" str Text To Find = "Discharge Pack" Set doc To Open = Application.
Sub Insert Text() Dim Doc As Document, str Text To Insert As String, str Text To Find As String Dim i As Long, doc To Open As File Dialog, s Hght As Single Dim rng To Search As Word.
but in the informal testing I've done, I've found that Visible = False makes Word work roughly 15% faster than Screen Updating = False does on identical tasks.
That's about 1 second for every 7-not a trivial amount if your job runs longer than that. Chief among them is that repagination routines don't work when Word is invisible.
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.
But it also works even if you run your Automation code from Word itself.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.