Gustav Brock
Gustav at cactus.dk
Fri Jul 22 05:04:24 CDT 2005
Hi Bobby One method is to avoid Selection and only deal with ranges. I've used that with Excel and guess you can do the same with Word. Another more radical method is to rebuild your function to generate the full RTF code and write that directly to a file. It may not be that difficult as you will not generate all the "fat" that Word normally adds to an RTF file. I've used that method for a client to generate the basic text for a catalogue and it runs at a speed you hardly believe, about 20ms per page. That's because all you do is to loop the recordset(s) while appending pure ASCII to a text file you keep open during the process. Look up in the archive "Writing raw RTF document using VBA - Solved" from 2004-01-02. /gustav >>> bheid at appdevgrp.com 07/21 8:31 pm >>> Me again, I am generating 1-2 tables per page on this report that I'm doing in word via automation. It takes, on average, 1.8 seconds to create one page. This is an average from 406 pages. In trying to make it faster, I have determined that the table code takes 66% of the time it takes to create a page. Note that the tables can have a variable number of items in it.