Createobject gives slow interaction with document

P

Pelle

I have an application that start word by either
CreateObject("word.application") or Getobject("word.application") if word is
already started. Then I add a document based on a template and fills it with
data.

The problem is that if Word is started by CreateObject it waits for almost
an infinite time (about 1 minute), almost as if word waited for something, or
not signalling that it is upp and running.

Starting Word the normal way (not by automation) is very fast.

Is this a known problem? Where do I search for the problem?
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?UGVsbGU=?=,
I have an application that start word by either
CreateObject("word.application") or Getobject("word.application") if word is
already started. Then I add a document based on a template and fills it with
data.

The problem is that if Word is started by CreateObject it waits for almost
an infinite time (about 1 minute), almost as if word waited for something, or
not signalling that it is upp and running.

Starting Word the normal way (not by automation) is very fast.

Is this a known problem? Where do I search for the problem?
What about using the NEW keyword instead of CreateObject
Set wdApp = New Word.Application

Is that any faster?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
P

Pelle

Thanks for the answer,

No, I tried both early and late binding, in this case it makes no difference.

One strange thing is, that if you interact with Word (after it is started by
automation and made visible) by cklicking som menus it answers quicker.

There is a macro started by VB6 (the host) that shows a dialog box in Word.

Regards
//Per Löfstedt
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?UGVsbGU=?=,
No, I tried both early and late binding, in this case it makes no difference.
Using the NEW keyword has nothing at all to do with early or late binding.
One strange thing is, that if you interact with Word (after it is started by
automation and made visible) by cklicking som menus it answers quicker.
I remember seeing people mention something like this, but I can't recall the
details. Hmmm. You might try mentioning this in the word VBA group and see if
someone there remembers how they did this programmatically. (I suspect it might
be something like using .Execute on a CommandBar control, but that's just a
guess.)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
P

Pranav Wagh

Do you have any antivirus running on your machine
--
Thank You..
Pranav Wagh, MCP, MCSD
Developer Support - Office Integration
Microsoft India(R & D) Pvt. Ltd
 

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