Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word automation extremely slow sometimes

Status
Not open for further replies.

arjacey

Technical User
Jan 22, 2007
12
GB
An old closed thread but I'm am having the same problems.

That is, Word (2000) automation is zippy in xp SP1 but in SP2 slows to a crawl. Unhappy users!!!

Has anyone had the same experience and/or, managed to fix it?

I don't think the IT budget setter will be happy if they have to upgrade to remove this small (MS introduced) problem.

 
Could be the default print driver. It isn't clear if your problem is some users all of the time of all users some of the time.
 
It's all of the users all of the time.

I will try removing the print driver temporarily to see if this improves things.

This is how the other dead threads started but no-one explained why this would be a problem with XP SP2 whereas it is fine with XP SP1. MS are silent on the matter (as far as my surfing can establish).
 
XP SP2 locked down many things and made many things more difficult (or even impossible). It could be that authentication when talking "through the ooze" slowed down. I can certainly see how it would.

I haven't noticed it but also haven't done much with automation recently.
 
Thanks Dan, I guessed it was something like that but it would be good to know if anybody has found out what it is and if it can be turned off!
 
The print driver would affect speed when automating formatting. No print driver at all will throw an error (at least it does in Excel).
 
Oh, Word will give all kinds of weird behavior with no print driver installed. Word makes ALL formatting/display decisions based on the current printer.

I can't see it causing a slowdown, so much, but hey ... I've seen printer drivers cause machines to reboot under mysterious conditions. (Video drivers as well.) I suppose the communication through a printer driver could add the performance overhead seen here.

Drivers are the ugly wart on Windows' butt.
 
Could be anything but the VBA that is the cause of the performance drop is a Search and Replace.
 
This is obviously an important issue for many of us. I was wondering how widespread it is. Have many other developers noticed this slow-down?

It would be useful to know if the problem is specific to Word, or does it also occur with other Office apps. Also, is it specific to Word 2000?

For my part, I have been running an application under both SP1 and SP2, and haven't noticed a difference. But the app just does a very simple mailmerge, which in any case is very quick.

I also have an app that uses XFRX to export to Word. On my laptop, which is SP1, this runs reasonably well, but on my main machine, which is SP2, it seems to hang (it runs so slowly that I have to abandon it). On the other hand, I only noticed this slowdown when I installed Word 2007, so that could be the cause of the problem.

What experiences have other developers had?

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike,

We are all on SP2 and running Word 2002 and I have not had any reports of anything in particular. I am always wary of new versions of Office apps. They always seem to cause some problems with automation.

pamela
 
One thought I had about authentication/credentials, as Dan alluded to, was are you creating the Word doc on a local drive or a network drive?
It's very possible that XP could hit the domain controller to verify the user's rights on that networked resource each time the app tried to update the doc.
If you're creating it locally, it may only check once.

But - I'm not a network dude, so I can't vouch for any of that.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
I've been suffering with this problem intermitently since corporate clients started rolling out SP2 a while ago.

So far I have not found any good solution. It doesn't matter which version of Word you use.

I'm convinced it's an authentication issue, but at the moment I just get clients to roll back to SP1 or install Win 2K instead!


Regards

Griff
Keep [Smile]ing
 
Griff

That is rather bad news as yours was the name on the original thread and I was rather hoping you had sorted it by now :eek:(

XP SP2 burnt into 50 new Dell PCs so I don't think a return to SP1 is going to be feasible. From what I know there are other reasons the have XP so 2k is probably not feasable either. Nor should it need to be. If I updated my software and caused a performance issue like this, I think I would have some irate phone calls quite quickly. Anyone got MS's number?

Looks like I'll have to try some workrounds (change automation to a macro, formatting all the text in VBA and then doing a single search and replace spring to mind).

 
I don't think M$ have recognised this as a problem yet - they probably don't use OLE to control Word from the likes of Dynamics (they might have some secret API that we can't use).

I'll have another look though.



Regards

Griff
Keep [Smile]ing
 
I mentioned earlier in this thread that I was noticing a substantial slowdown on one particular computer. This occurs when exporting a report under XFRX to Word (this uses normal Automation calls).

Well, the machine in question was running a beta of Word 2007, which expired today. I uninstalled the beta and ... guess what? Performance immediately returned to normal.

(This is with VFP SP1 and XP SP2.)

I'm not saying this is the cause of the problem noted by Arjacey and others. But it's interesting, don't you think?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
A bit of both, I'm afraid!

Regards

Griff
Keep [Smile]ing
 
A thought:
Are you recreating the Instance (word) every time you need it, and even though you explicitly release it, are you re-checking for it before opening another instance?
Some times word has a nasty habit of sticking around and maybe there are too many instances being opened. This will slow it down depending on your machine.
Code:
*oWord is declared as Public in the start program
If !Atsapp.checkifappisrunning("Microsoft Word")
	oWord = Createobject("word.application")
Else
	oWord = Getobject( ,"word.application")
Endif

*Atsapp is a custom class and 'checkifappisrunning' checks for an instance of word.

Word2003 does take about 2-3 seconds to open (visible). But never seen it slowdown as you have described.
 
My problem happens from the very first instance of Word, so I can be sure it's not that - but it might not be a bad idea!

B-)

Regards

Griff
Keep [Smile]ing
 
Hey Griff,

How are your users/network set up? Domain users or workgroup users? (And if the latter, "power users" or "standard users".)

Not sure if I've got all the terminology right, but it's one thing to look at. I can see things going right quick for Admin users, but Standard users being forced through more security checkpoints.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top