Report Generator: Slow and Huge 
Author Message
 Report Generator: Slow and Huge

Hi,

I am porting a report generator which is using Word for formatting the
reports using VBA.
I have a problem with a big document here - the document is about 1,100
pages, 5,5 MB. For generation it takes about 15 minutes on Word 97.

the destination platform I have to port it to is running Word XP. The macros
there are running much slower - the same report takes about two (!) hours
and the generated Document is about 33 MB (!).

I have looked on several news groups and found the normal things, like
turning off fast saves etc., but all options were already deactivated.
Deleting normal.dot and cutting and pasting the contents into a new document
did *not* make the size smaller.

I guess the size and runtime correlate somehow, so is there a way to keep
the document small while generating?

Thanks in advance for your help.

Regards,
Stefan

P.S: For private reply please write to
stefan.bindel.intern(at)msc-online.net



Mon, 24 Oct 2005 22:29:22 GMT  
 Report Generator: Slow and Huge



Quote:
> G'day Stefan,

> have your turned off screen updating?

I use Application.Visible = False at the beginning. That should do it,
right?

Quote:
> Do you destroy all used objects?

I am only using Documents and Selection. I close the Documents at the end.
What exactly do you mean with destroying the objects? Are there any objects
created implicitly?

Quote:
> If you save as HTML and reload, save as doc, does the file size drop
> dramatically?

Not really, no.

Regards,
Stefan



Fri, 28 Oct 2005 20:43:19 GMT  
 Report Generator: Slow and Huge

1. Correct

2. Lets say you use a document object of your own:

Dim D as Document

at the end of your routine you should do a

Set D = Nothing

if you are only using the built in objects like ActiveDocument and
Selection this is unnecessary, otherwise all variables that hold any
object type should be explicitly cleared in this manner to force the
execution of their terminate event.


Quote:



>> G'day Stefan,

>> have your turned off screen updating?
>I use Application.Visible = False at the beginning. That should do it,
>right?

>> Do you destroy all used objects?
>I am only using Documents and Selection. I close the Documents at the end.
>What exactly do you mean with destroying the objects? Are there any objects
>created implicitly?

>> If you save as HTML and reload, save as doc, does the file size drop
>> dramatically?
>Not really, no.

>Regards,
>Stefan

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.

Products:   http://www.geocities.com/word_heretic/products.html
Spellbooks: 735 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.



Mon, 31 Oct 2005 05:22:13 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Prime Number Generator: Set up is huge, Why?

2. Reports writer / generator - Diamond Reports TM

3. Access report generator instead of Crystal Reports

4. Reports writer / generator - Diamond Reports TM

5. Crystal Reports Report Generator

6. Slow, slow, slow search on VB6, ADO and SS7

7. VB4 is slow..slow....slow

8. Insert into SQL Server slow, slow, slow...

9. report generator

10. Universal report generator

11. Universal Report generator

12. VB SQL Report Generator ?

 

 
Powered by phpBB® Forum Software