 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Will1 Guest
|
Posted: Thu Dec 09, 2004 10:48 pm Post subject: Word application takes a lot of time to connect |
|
|
Hi
i´m making an app that generates a word document, but its take a lot
time to do it, i have cheked the entire proccess and the most slow part
is when i connect to word
Wordapp.connect;
I would like to know is there are a way to make it faster. im using the
delphi servers objets.
thaks
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
George Birbilis Guest
|
Posted: Fri Dec 10, 2004 4:21 pm Post subject: Re: Word application takes a lot of time to connect |
|
|
try making the connection once and reuse it (maybe have some hidden app of
yours that connects to Word at boot time and your utilitiy app talks to that
hidden app [which already has a connection to Word] to do the job). Of
course that means a bit longer boot time, plus some memory hogging for the
user. However various companies are doing such stuff (MS with Office startup
placed at startup menu, Apple with QTTask placed at registry etc.)
also maybe it helps to spawn Word somehow invisible yourself (maybe it takes
some command-line parameter to do so [can call "start msword" from the
command-line for example to start Word, without caring where it's
installed]), then connect to its running instance
| Quote: | i´m making an app that generates a word document, but its take a lot
time to do it, i have cheked the entire proccess and the most slow part
is when i connect to word
Wordapp.connect;
I would like to know is there are a way to make it faster. im using the
delphi servers objets.
|
|
|
| Back to top |
|
 |
Jon Robertson Guest
|
Posted: Fri Dec 10, 2004 6:48 pm Post subject: Re: Word application takes a lot of time to connect |
|
|
George Birbilis wrote:
| Quote: | try making the connection once and reuse it
|
Be careful doing this. Any other app that uses Word and starts after
your app may try to use the instance that you created. It is up to the
application to determine whether to check for an existing instance
(GetActiveObject) or always create a new instance.
We always create a new instance. But if another application, such as
Outlook, starts after we create our instance, we start getting
exceptions when we try to use the Word instance that we launched.
--
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
MedEvolve, Inc
http://www.medevolve.com
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|