[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Poor performance of Word on loading?

Peter

7/4/2007 9:10:00 PM

Hello,
we use Word in a vb2005 win-forms-app. We need it for open
password-protected docs and save it without password in a Temp-Path.
We also need it to show the word-doc and write-protect it in a web-browser
within a win-form.

We have the problem that the startup of the application takes to much time.
After lot's of testing the time-losing process is before the module with the
word-Startup beginns- it is NOT the word-Start itself. Even if the Word-Start
is "outsourced" in a background-Worker-Process, this modul containing the
backgroundworker makes a "i wait for nothing 20 seconds".
The Startup itself is in a function, where we check, is word yet alive
(marshal.getactiveobject(word...)) or must it be startet (return new
word.app.)

Sometimes when we remove the interop-office and word from "Verweise" (Links
in English?) the startup will be very fast. But the next start is the return
of slowness.

It's all the same on all machines...XP/SP2, Office 2003., also on
End-user-PCs, and they don't want to wait 30 sec for startup of a programm.

Code like this:
dim oW as word.application
sub loadProgramm
startDatabase
StartDocs
OPenForm
end sub

sub startdatabase
'connect and load data
end sub

sub startdocs ----->BEFORE this modul starts, there is the Timeconsumption!
oW=CheckWord(oW)
.....do something else...
end sub

function Checkword(W as word.application) as Word.application --->FAST
if isnothing(ow) then
check if word is in prozess list and then use this....else
return new word.application
else
return ow
endif
end function


This is what we can see while debugging.

Any suggestions??
Thanks

Peter