Yes, I realize. Basically, I need to convert thousands of endnotes into a self-contained study-guide to a separate textbook, with graphics and charts added to this guide, so they can't be left as endnotes. I'll add the graphics only after the book is finalized, so I won't need the endnotes to self-update after that (and this way, with section breaks, if anything does get changed, it will only affect one chapter's notes and numbering, so it won't be a complete disaster).
I think I’ve maybe figured out a general idea how it could be solved, but a few things are beyond my newbie VBA skills.
I plan to dim an array
search for each section break
search for the first endnote after the break
record this endnote’s index in my array
then run the macro I presented, but instead of inserting aendnote.Index I’d subtract from it the highest value in my array less than it (+1) and insert that into the study guide, (and convert the index into a letter, that the textbook people prefer).
If anybody’s got an easier way, I’d love to save myself the trouble. Otherwise maybe you can answer a couple things.
If I search for an endnote with a simple Find “^e” how do I extract the index of the endnote I just landed on? Would it be something like Selection.Endnotes.Item.Index? That’s pure guesswork based on the options I got each time I hit a period. I have no idea if I’m on the right track. I assume all these properties are cataloged somewhere, but I'm flying blind. Are there any other landmines you see looming on my path. I’m an old basic programmer (who hasn't programmed in a couple decades), but this is my first significant encounter with VBA and I’m a little out of my depth. (The work is for a non-profit that can't afford a real programmer, so they're stuck with me).
|