Word.Application, Documents.Open very slow first time.

G

Gemma M

I have a VBScript which does the following :

--------
Set objWord = CreateObject("Word.Application")
objWord.Options.ConfirmConversions = False
objWord.DisplayAlerts = 0 ' 0 = wdAlertsNone
' -- Open the Master-file Word document. --
on error resume next
' - Open (name, confirmConversions, readOnly, addToRecentFiles)
Set masterDoc = objWord.Documents.Open(documentMaster, False, True, False)
---------
documentMaster is something like "http://localhost/IServiceRoot/Documents/Documents\Master_1103718229.doc

It runs on the client-side of an Internet connection. It works.

HOWEVER, the first execution takes much, much longer than all subsequent executions (where first means immediately after switching on the machine, or immediately following a re-boot).

This has been observed in Office 2000 and 2002.

Does anyone know the cause?
Does anyone know how to alleviate the cause?
Can I cause some task, process or component to load manually that will make life easier for Word when it first opens a document in this manner?

Gem
 
W

Word Heretic

G'day "Gemma M" <[email protected]>,

With your chosen method, no. You have to prime the network connection
and caching and so on. The truly fastidious would do something like
have a startup script addition to copy said http file down locally
then kill it :)

That being said, the better solution is to have the SOE include a
xcopy of updated files down locally on each client machine. This
ensure rapid access, less errors and simpler coding.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Gemma M reckoned:
 
G

Gemma M

Hi Steve

Thanks for the reply.

I have a question, which I hope don't make me sound dumb (I know I'm blonde,
but not that blonde!). What is the SOE?

Maybe I should point out that the HTTP files are generated just before they
are opened by Word. So, is it practical to have the SOE copy down the files
each time, just prior to opening them using Word?

Finally, attempts I have tried to down-load WORD files locally before
opening always give me the prompt about the potential dangers of downloading
files, Open, Save, Cancel. The process must be invisible to the user, so I
don't want them being presented with question they won't understand. Is
there method of copying locally, other than Response.AddHeader,
Response.Write objStream.Read type? You mention XCOPY. Will XCOPY work in
an ASP VBScript or Client-side VBScript?

Gem

Word Heretic said:
G'day "Gemma M" <[email protected]>,

With your chosen method, no. You have to prime the network connection
and caching and so on. The truly fastidious would do something like
have a startup script addition to copy said http file down locally
then kill it :)

That being said, the better solution is to have the SOE include a
xcopy of updated files down locally on each client machine. This
ensure rapid access, less errors and simpler coding.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Gemma M reckoned:
executions (where first means immediately after switching on the machine, or
immediately following a re-boot).
 
W

Word Heretic

G'day "Gemma M" <[email protected]>,

Standing Operating Environment - the way your IT guys set up and lock
down workstations.

Maybe I should point out that the HTTP files are generated just before they
are opened by Word. So, is it practical to have the SOE copy down the files
each time, just prior to opening them using Word?

Yes you should point it out, yes you should still do a pre-copy to
prime the network connection from start to end. But this time use a
std target file like Empty.txt which is an empty text file purely
there to establish your paths.

You don't have to open the file as a document and I wouldnt use files
like that for this purpose. Eg, use Empty.txt.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Gemma M reckoned:
 
G

Gemma M

Hi,

I can find no method by which a file can be copied (pulled) from the HTTP
server to the local client. Client-side commands do not recognise
"http://host/service/empty.txt" as a file name, and hence do not perform the
relevant copy (Scripting.FileSystemObject and WScript.Shell to name but
two). Can you recommend an object, command or method by which a copy of the
sort you recommend, to prime the network caching etc, can be effected?

Gem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top