View Single Post
 
Old 05-11-2018, 08:57 AM
catflap's Avatar
catflap catflap is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Aug 2015
Location: UK
Posts: 77
catflap is on a distinguished road
Default

Hi Guessed

Here are the results of running the macro 5 times on a document of 500 pages:

Speedtest macro:

1) 216 seconds
2) 670 seconds
3) 572 seconds
4) 285 seconds
5) 458 seconds

Average: 440 seconds

Previous macro:

1) 799 seconds
2) 498 seconds
3) 629 seconds
4) 525 seconds
5) 500 seconds

Average: 590 seconds

So your latest code is definitely faster, but there's still a huge amount of variation in process time going on.

Interesting what you mentioned about dimensioning as well - I always thought that putting the 2 variants in the same line:

Dim shapecount, shapemax As Long

...would dim both as Long, so I've learned something new there.

By the way, I don't do these jobs every day, but when I do I often have 10 or more docs of 1000 pages each to do, so it's definitely worth me trying to shave as much time off the process as possible.
Reply With Quote