Link to home
Start Free TrialLog in
Avatar of ayottea
ayottea

asked on

Word object acting very slowly

I have this problem: I use a Word object, created by CreateObject("Word.Application"), in a VB6 application. All the commands I send to Word using this object, no matter the command, even parameter change ( like refWord.Selection.Find.Wrap = 1  ), are very slow, around 3 commands by second.

The problem appends on Word 2000 only, and only on half my test computers, no matter the Word patch installed.

I have the same problem with a Foxpro application.

My application send thousands commands to Word, it can up to fifteen minutes to execute a task.
Avatar of Smallint
Smallint

Only way to speed up Word automation is to use early binding.

I mean:

Use

Dim oApp as Word.Application
Set oApp = new Word.Application

Instead of

Dim oApp as Object
Set oApp = CreateObject("Word.Application")

You must do it for all of your Word Objects in your project.

Anyway automation is not known by its performance, but using early binding you can expect to be twice faster than using late binding.

Take a look here...

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q245115


Cheers


Cheers
Avatar of ayottea

ASKER

It doesn't work.
I included the object library of Word 2000 and used oApp = new Word.Application, and it's still slow.

Remember, I don't have any speed problem with other versions of Word, and I got this on only half my test computers, no matter the operating system, or the patch installed.
ASKER CERTIFIED SOLUTION
Avatar of Smallint
Smallint

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ayottea

ASKER

I got a clue, the problem doesn't appends on Windows 2000, only on Windows XP, but, not on all computer with Windows XP. There is a third clue I must find, and I can't.

I tried to reinstall Office, I tried to ally updates for Office and Windows one by one, I still can't find what is the third clue.
Avatar of ayottea

ASKER

Finally, it was a bug in Office 2000 . Yesterday's patch is the solution.

Thanks for your support.