PDA

View Full Version : Parse string from portion of Endnotes and apply hierarchy



Automate
10-31-2017, 12:00 PM
This is a bit complicated so I apologize in advance if what I'm asking is not very clear. I created a sandbox word doc (attached) that tries to better explain things and it's formatted how my real information will be presented. The logic below is also in the word doc as are better explanations of what "Old Master" and "New Master" represent. It's currently saved as a DOC vice DOCM as I have no idea where to even begin with this macro. This will save untold number of hours if I can get this figured out - so thanks in advance!

Logic/Process:

Manually select text of one paragraph in the body and run macro to:

Find the endnotes within the selected text (not the numeric superscripts but the actual text associated with the endnotes within the selected text.
Extract the data between “Extracted material is from ” and the next semicolon
Build the “New Master” based on the hierarchy rules
If “New Master” does not match “Old Master”, ask user if they want to replace with “New Master”
If user selects YES, tell user “Old Master” has been changed to “New Master”
If user selects NO, do two things: 1) Tell user “Derivative does not match. Please manually verify” and 2) Color “Old Master” (i.e. everything between the first open and close parenthesis) red.
End