format the following paragraph beneath found text

Joined
Jun 1, 2014
Messages
1
Reaction score
0
Hi

I have a 94 page word doc with 28000 words

many of the words are underlined. i can use word to 'find' all the instances of the underlined words, copy and paste to a text doc and i got em. that works fine.

but there is one other detail i need help with. maybe there is a macro that can do this.

not only do i need to extract the text that is underlined, i need also to extract the paragraph underneath the underlined word/phrase

so what i want to macro to do is 1) find all instances of underlined text on the page. all the underlined text have their own line, and it is just a few words or less, then 2) find the *paragraph* just below the underlined text, and either underlie it too, or, better, extract it along with the underlined text.

For example, the doc looks like this

"random text i dont want, etc etc etc

category of interest 1

Here is the paragraph underneath the category of interest uderlined phrase. It is very important, and i want to grab it, as well. if i can at least have the macro underlie this text, that works, of if the macro can locate the underlined phrase just above and extract that and this paragraph as well, in sequence, as all instances of each pairing apprear in the document down to the botom of the doc, that would be great too.

more randome text i dont want, etc etc etc

category of interest 2

Here is another paragraph i want. lets imagine it has 5 more sentences, etc.

more random text i dont want"

OK, so the finished product will either look like this (where word underlines the paragraph underneath the already underlined phrase):

"random text i dont want, etc etc etc

category of interest 1

Here is the paragraph underneath the category of interest uderlined phrase. It is very important, and i want to grab it, as well. if i can at least have the macro underlie this text, that works, of if the macro can locate the underlined phrase just above and extract that and this paragraph as well, in sequence, as all instances of each pairing apprear in the document down to the botom of the doc, that would be great too.

more randome text i dont want, etc etc etc

category of interest 2

Here is another paragraph i want. lets imagine it has 5 more sentences, etc.

more random text i dont want"

Or maybe the macro can extract the underlined text and the desired paragraph immediately following to a text file or something, i.e.:

"
category of interest 1

Here is the paragraph underneath the category of interest uderlined phrase. It is very important, and i want to grab it, as well. if i can at least have the macro underlie this text, that works, of if the macro can locate the underlined phrase just above and extract that and this paragraph as well, in sequence, as all instances of each pairing apprear in the document down to the botom of the doc, that would be great too.

category of interest 2

Here is another paragraph i want. lets imagine it has 5 more sentences, etc.
"

tia





 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top