Posted on 2000-02-22
I'm working on a Word utility, and I'm trying to come up with a way to show a progress bar that marks the opening of Word.
The problems are:
1) I lose control of the computer when my program passes control to Word. I tried DoEvents, but it had no effect.
(Maybe I didn't do it right.)
2) I thought about a timer, but Word opens in different times, depending on processor speed, memory, and whether or not Word has already been opened.
So, is there a way to get imformation back from Word as it opens, or is there a way to run a loop or timer while Word opens?
And... Is a loop or a time better? I tend toward a loop. Does a loop run slower and faster of different machines?
Here's my code for opening word:
Public Sub OpenWordApp()
Const ERR_APP_NOTRUNNING As Long = 429
'Create error and go to next line.
On Error GoTo ERR_APP_NOTRUNNING
Set appWord = GetObject(, "word.application")
Set appWord = New Word.Application