View Single Post
 
Old 12-29-2021, 01:53 AM
benbob benbob is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2018
Posts: 5
benbob is on a distinguished road
Smile Search for a Text, then copy the header to a list

Hi,

This is beyond my weak macro knowledge.

I am trying to build a macro that searches a large word document for 16.1

When it is found, it takes the first heading 2 styled text above this number (usually a few paragraphs above but it's not consistent)

It adds this heading text to a list and then continues the search until the entire document has been searched. I will end up with a list of headings with 16.1 within that heading section.

The document can be hundreds of pages, so want to find a way not to do it manually by running a search for 16.1 and manually copying the headings from the highlighted sections.

Do you think is possible in a macro, can anyone get me started?

Thank you in advance
Reply With Quote