Microsoft Office Forums


Reply
Thread Tools Display Modes

Word Automation Speed Slow

 
 
DDJ
Guest
Posts: n/a
 
      01-26-2005, 12:31 AM
I took a look at this ng's FAQs and could only locate one article (by Daryl
Lucas) with some pointers regarding speeding up Word Automation from VB6.
These were fairly limited in scope...can anyone point me to some more
detailed discussions on how to speed up Word Automation? Seems like it's
really slow from the testing I've done so far (creating tables in code seems
to be the worst).

Dan


 
Reply With Quote
 
 
 
 
DDJ
Guest
Posts: n/a
 
      01-26-2005, 03:44 AM
Thanks for your response.

We are primarily taking data from a table used by our program and writing
the data to a report created using Word.

To give an example...one report requires the building of approx. 10, five
colum tables to output a two page report. Without having actually measured
the time it takes, I can say that it seems to take quite a long time, in the
range of 30 seconds or more. This, for a report that I wouldn't consider
terribly long.

I have been sticking with using Range objects; screen updating is switched
off; and Word is hidden (at least until the document has finished processing
and is opened in Preview mode).

One area in which I was hoping there would be a more efficient way to
proceed...the examples I'm using (from various help files, etc.), show each
Word table being populated cell by cell, from row to row (the "Z" pattern)
using "For Each" iterations. Is this really the fastest way to go? The
same goes for formatting these cells. I think I can probably learn ways to
format the larger pieces (say at the table level) that are faster than doing
so at a lower level (the cell level).

Any input appreciated.

Dan

"Jezebel" <(E-Mail Removed)> wrote in message
news:OE%(E-Mail Removed)...
> Perhaps you could explain a little more of the issues you're dealing with?
> Word automation isn't normally very slow unless you're doing silly things
> like working intensively with the Selection object, using the Windows and
> Panes objects, and forcing Word to repaginate continually. Some basic
> tips --
>
> - Work exclusively with Range objects. Use the Selection only for direct
> interaction with the user.
>
> - Work with screen updating switched off or, better still, with the

document
> or Word itself hidden.
>
> Apart from that, VBA coding, as far as performance goes, is subject to the
> same general principles as VB coding: check the VB forums and discussion
> sites.
>
>
> "DDJ" <(E-Mail Removed)> wrote in message
> news:FwBJd.32$(E-Mail Removed)...
> > I took a look at this ng's FAQs and could only locate one article (by

> Daryl
> > Lucas) with some pointers regarding speeding up Word Automation from

VB6.
> > These were fairly limited in scope...can anyone point me to some more
> > detailed discussions on how to speed up Word Automation? Seems like

it's
> > really slow from the testing I've done so far (creating tables in code

> seems
> > to be the worst).
> >
> > Dan
> >
> >

>
>



 
Reply With Quote
 
 
 
 
Jay Freedman
Guest
Posts: n/a
 
      01-26-2005, 03:56 AM
A couple more tips:

- In general, build as much of the automation as possible in macros
within VBA, and call them from VB. The OLE interface between VB and
VBA is often the slowest part of the operation, so minimize the
message-passing between them.

- For tables specifically, the fastest method is usually to build up
the text of the table as ordinary text, with tabs between columns and
a paragraph mark at the end of each row. When it's all ready, use
ConvertTextToTable. Also see
http://www.word.mvps.org/FAQs/TblsFl...FastTables.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On Wed, 26 Jan 2005 12:49:20 +1100, "Jezebel"
<(E-Mail Removed)> wrote:

>Perhaps you could explain a little more of the issues you're dealing with?
>Word automation isn't normally very slow unless you're doing silly things
>like working intensively with the Selection object, using the Windows and
>Panes objects, and forcing Word to repaginate continually. Some basic
>tips --
>
>- Work exclusively with Range objects. Use the Selection only for direct
>interaction with the user.
>
>- Work with screen updating switched off or, better still, with the document
>or Word itself hidden.
>
>Apart from that, VBA coding, as far as performance goes, is subject to the
>same general principles as VB coding: check the VB forums and discussion
>sites.
>
>
>"DDJ" <(E-Mail Removed)> wrote in message
>news:FwBJd.32$(E-Mail Removed)...
>> I took a look at this ng's FAQs and could only locate one article (by

>Daryl
>> Lucas) with some pointers regarding speeding up Word Automation from VB6.
>> These were fairly limited in scope...can anyone point me to some more
>> detailed discussions on how to speed up Word Automation? Seems like it's
>> really slow from the testing I've done so far (creating tables in code

>seems
>> to be the worst).
>>
>> Dan
>>
>>

>


 
Reply With Quote
 
DDJ
Guest
Posts: n/a
 
      01-26-2005, 10:46 PM
Thanks all for the comments/suggestions.

I played with this today using some of the suggestions on the MVP site and
was able to reduce the time it takes to process tables significantly (very
significantly!).

Now I'm working trying to figure out how to reduce the resource consumption.
The CPU goes to 100% while the document is being written in code, then
(oddly) stays at 100% for a long time (60 to 120) seconds after that (I'm
using a table with five columns and 1000 rows for testing purposes). Any
thoughts here would be appreciated.

Dan

"DDJ" <(E-Mail Removed)> wrote in message
news:FwBJd.32$(E-Mail Removed)...
> I took a look at this ng's FAQs and could only locate one article (by

Daryl
> Lucas) with some pointers regarding speeding up Word Automation from VB6.
> These were fairly limited in scope...can anyone point me to some more
> detailed discussions on how to speed up Word Automation? Seems like it's
> really slow from the testing I've done so far (creating tables in code

seems
> to be the worst).
>
> Dan
>
>



 
Reply With Quote
 
Alex_P
Guest
Posts: n/a
 
      02-14-2005, 04:47 PM
We have applications written in VB6 which are producing large 200 - 500 pages
word documents with a lot of content, such as : pictures, tables, styles,
etc. After installation of MS Word 2003 the performance decreased
tremendously, from 40 min to 4 hours per 200 pages. We also noticed that as
document gets bigger, then we begin to notice slowing down. We contacted
Microsoft, but haven't heard the from them

"DDJ" wrote:

> I took a look at this ng's FAQs and could only locate one article (by Daryl
> Lucas) with some pointers regarding speeding up Word Automation from VB6.
> These were fairly limited in scope...can anyone point me to some more
> detailed discussions on how to speed up Word Automation? Seems like it's
> really slow from the testing I've done so far (creating tables in code seems
> to be the worst).
>
> Dan
>
>
>

 
Reply With Quote
 
AlexP
Guest
Posts: n/a
 
      02-14-2005, 06:55 PM
We have application written in VB 6.0 which costructs large Word documents
200 -500 pages with a lot of content, such as: pictures, tables, styles, etc.
It was taking about 40 min to build 200 pages document. We had used this
application from Word 97 to Word 2002. Recently we had our stations upgraded
with Office 2003 and we have experienced tremendous performance degrade. It
took about 4 hours to do the same document. Is anybody aware what happens? We
have contacted Microsoft, but so far we have not received an answer.

"DDJ" wrote:

> I took a look at this ng's FAQs and could only locate one article (by Daryl
> Lucas) with some pointers regarding speeding up Word Automation from VB6.
> These were fairly limited in scope...can anyone point me to some more
> detailed discussions on how to speed up Word Automation? Seems like it's
> really slow from the testing I've done so far (creating tables in code seems
> to be the worst).
>
> Dan
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open form speed vs Navigation speed Plumdodge Access Forms 3 06-16-2006 04:29 PM
WORD 2002 - slow slow slow Thanks to AT&T Word Errors 5 09-27-2004 10:49 PM
Re: WORD documents load slow slow slow Graham Mayor Word Documents 1 01-09-2004 07:16 PM
Re: ppt 2k animation speed speed Sonia PowerPoint Newsgroup 1 07-24-2003 10:57 AM


All times are GMT. The time now is 07:13 AM.
Microsoft Office Forums is not affiliated with Microsoft Corporation.


Welcome!
Welcome to the Microsoft Office Forums
 


Latest Threads
Remote help?
newman200 (04-13-2014, 12:54 PM)

Access command button help needed
MikeyL (04-06-2014, 07:01 PM)

Page number problem
satrah (04-06-2014, 10:48 AM)

3 line boarder
satrah (04-06-2014, 01:30 AM)

send from OneNote 2013 to PowerPoint 2013?
havping (04-01-2014, 09:50 PM)