?
Solved

Word object acting very slowly

Posted on 2005-03-08
5
Medium Priority
?
229 Views
Last Modified: 2010-05-02
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.
0
Comment
Question by:ayottea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:Smallint
ID: 13494959
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
0
 
LVL 1

Author Comment

by:ayottea
ID: 13496116
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.
0
 
LVL 7

Accepted Solution

by:
Smallint earned 1000 total points
ID: 13500892
Your problem sounds very strange, and if you are sure all machines are on same patch level, then I'm wondering if may be problem is something external to VB. Have you seen something strange in Task Manager, any process near 100%? Any common program on slow machines? Have you tried to reinstall Office?
0
 
LVL 1

Author Comment

by:ayottea
ID: 13574284
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.
0
 
LVL 1

Author Comment

by:ayottea
ID: 13771974
Finally, it was a bug in Office 2000 . Yesterday's patch is the solution.

Thanks for your support.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question