G
Gemma M
The VBScript below times how long it takes to run Word, and open a document.
The first time it runs, following power-on or system restart, it takes an
order of magnitude longer to open the document than all subsequent runs. I
have tried it on three machines. One took 15 seconds to open the document
first time around, and then half a second for all subsequent runs. One too
12 seconds for initial opening, and 1.5 seconds thereafter, and my own
desk-top too 9 seconds for the first opening, and half a second
subsequently.
My question is : why so long for the initial document opening? Or in other
words, what is it doing first time that it isn't doing all subsequent times?
Is it possible for me to trigger whatever the initial document opening is
doing, without actually opening a document (in other words "hide" whatever
is happening in the first document opening in the login process)?
Also ... Is there a WEB site or book that will give me some background to
the mechanism being employed to access the document?
Gem
---------------------------------------------
Dim w
Dim d
Dim logger
Dim n
Dim m1
Dim m2
n = Now
MsgBox "Go!"
m1 = Timer
Set logger = CreateObject("XSyslog.Syslog")
Set w = CreateObject("Word.Application.9")
w.Visible = True
Set d =
w.Documents.Open("http://LocalHost/TestWeb/documents/documents/test.doc")
m2 = Timer
logger.PostMessage "Close : " & CStr(m2 - m1), 6, "Main"
d.Close
w.Quit
Set logger = Nothing
Set d = Nothing
Set w = Nothing
The first time it runs, following power-on or system restart, it takes an
order of magnitude longer to open the document than all subsequent runs. I
have tried it on three machines. One took 15 seconds to open the document
first time around, and then half a second for all subsequent runs. One too
12 seconds for initial opening, and 1.5 seconds thereafter, and my own
desk-top too 9 seconds for the first opening, and half a second
subsequently.
My question is : why so long for the initial document opening? Or in other
words, what is it doing first time that it isn't doing all subsequent times?
Is it possible for me to trigger whatever the initial document opening is
doing, without actually opening a document (in other words "hide" whatever
is happening in the first document opening in the login process)?
Also ... Is there a WEB site or book that will give me some background to
the mechanism being employed to access the document?
Gem
---------------------------------------------
Dim w
Dim d
Dim logger
Dim n
Dim m1
Dim m2
n = Now
MsgBox "Go!"
m1 = Timer
Set logger = CreateObject("XSyslog.Syslog")
Set w = CreateObject("Word.Application.9")
w.Visible = True
Set d =
w.Documents.Open("http://LocalHost/TestWeb/documents/documents/test.doc")
m2 = Timer
logger.PostMessage "Close : " & CStr(m2 - m1), 6, "Main"
d.Close
w.Quit
Set logger = Nothing
Set d = Nothing
Set w = Nothing