K
kudruu
Hi,
I am writing a macro for a huge word document that will label certain
conditions (from about 1-2000) and will isolate the sections and
conditions of these conditions and place them into a neatly formatted
CSV file.
The document is in this kind of format:
*********
(bold)1.2.3.4 HEADER(/bold)
Here is a condition and a keyword[number] that is indexed.
Here is another condition and a keyword[number] that is indexed.
(bold)2.3.4.5 HEADER(/bold)
Here is a condition and a keyword [number] that is indexed.
********
The problem I am having is how to get word to first extract the number
before the header, then the header itself. I also don't know how to
look at each keyword and work backwards to find a carriage return
(another another keyword) and forward to the next period (or next
carriage return) in order to properly index a CSV file like this:
Index, keyword, Header Number, HEADER, Description
The keyword is always the same word and only indicates a numbered
condition.
Right now my macro will label all of the keywords but it will not find
headers, numbers, or extract the descriptions.
Any help would be greatly appreciated,
Thanks!
I am writing a macro for a huge word document that will label certain
conditions (from about 1-2000) and will isolate the sections and
conditions of these conditions and place them into a neatly formatted
CSV file.
The document is in this kind of format:
*********
(bold)1.2.3.4 HEADER(/bold)
Here is a condition and a keyword[number] that is indexed.
Here is another condition and a keyword[number] that is indexed.
(bold)2.3.4.5 HEADER(/bold)
Here is a condition and a keyword [number] that is indexed.
********
The problem I am having is how to get word to first extract the number
before the header, then the header itself. I also don't know how to
look at each keyword and work backwards to find a carriage return
(another another keyword) and forward to the next period (or next
carriage return) in order to properly index a CSV file like this:
Index, keyword, Header Number, HEADER, Description
The keyword is always the same word and only indicates a numbered
condition.
Right now my macro will label all of the keywords but it will not find
headers, numbers, or extract the descriptions.
Any help would be greatly appreciated,
Thanks!