BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Word application takes a lot of time to connect

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Will1
Guest





PostPosted: Thu Dec 09, 2004 10:48 pm    Post subject: Word application takes a lot of time to connect Reply with quote



 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





PostPosted: Fri Dec 10, 2004 4:21 pm    Post subject: Re: Word application takes a lot of time to connect Reply with quote



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





PostPosted: Fri Dec 10, 2004 6:48 pm    Post subject: Re: Word application takes a lot of time to connect Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.