S
Steven S. Silver
I am using VBA in word 2003 to generated large numbers of reports with data
extracted from an Access database. Word was chosen as the platform since we
need its robust formatting features.
When the program starts I can generate reports at the rate of 1/per second.
After a number of reports (1000-3000) are generated the reports start taking
in excess of 6-10 seconds per report, each with nearly identical content.
Timing probes show the problem to be in the SAVEAS code line. If I
completely close down word and restart it, the speed jumps back to the nearly
1 second per report range. At first I thought the problem was specifically
involved with putting too many reports in the same directory but if I break
the code and change the output directory to one that is empty and continue
execution the speed still stays slow [until I close and restart word as
explained above]. Our plan is to create nearly 100,000 reports in this
manner so speed is important. Does anyone have suggestions? Thanks.
extracted from an Access database. Word was chosen as the platform since we
need its robust formatting features.
When the program starts I can generate reports at the rate of 1/per second.
After a number of reports (1000-3000) are generated the reports start taking
in excess of 6-10 seconds per report, each with nearly identical content.
Timing probes show the problem to be in the SAVEAS code line. If I
completely close down word and restart it, the speed jumps back to the nearly
1 second per report range. At first I thought the problem was specifically
involved with putting too many reports in the same directory but if I break
the code and change the output directory to one that is empty and continue
execution the speed still stays slow [until I close and restart word as
explained above]. Our plan is to create nearly 100,000 reports in this
manner so speed is important. Does anyone have suggestions? Thanks.