troubleshooting Question

Word VBA - looping and Paragraphs

Avatar of hindersaliva
hindersalivaFlag for United Kingdom of Great Britain and Northern Ireland asked on
VBAMicrosoft Word
11 Comments6 Solutions535 ViewsLast Modified:
I'm finding that looping through 5,000+ paragraphs in a document, to find approx 40 that have a Heading 1 style, is slow (takes minutes, and not milliseconds).

Is there a quick way of 'finding the next Heading 1 style'?

I heard that with the Paragraphs collection we don't need to loop through to work with the paragraphs. I don't know if that helps with my quest.

Thanks for any help.
Join our community to see this answer!
Unlock 6 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 6 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros