The script you sent compiles fine, but doesn't change anything by itself when I run it.
Well, it isn't tweaked for your situation, it's actually reversed from
what you want. On my machine, it changes text in italics to have
underlines, no problem. Does your doc have text in italics? Test it on a
dummy doc. Mine is just a simple variation on the p156 script.
I've looked at the script on p. 156 of the Dictionary. This seems exactly relevant to my situation. The problem: I don't understand where I would drop this into the Replace Everywhere script. If I understand correctly, I'd have to drop it into several spots to affect not just the main body of the text but also headers and footers. And I'd have to create a new TextRange section to handle notes.
Keep in mind that I'm very novice at this, but as I understand it (and
I'm fairly confident about this bit): You don't have to drop it into
several spots. See the section at the end, where it starts "on
ReplaceInRange"? The ReplaceInRange bit is the code that specifies what
the actual replacement will be. Looking above in the script, everytime
you see "my ReplaceInRange", that just calls the script at the end and
runs it. And yes, it needs another section to go through the Footnotes
and call "my ReplaceInRange" for the notes.
Would I replace something already in the script with this material, and then tweak it to effect a substitution of italic for bold? Would I simply add it to the existing script at strategic points, then tweak it?
That's the tricky part. The ReplaceInRange subsection at the end needs
to be edited to do a formatting change, as it's currently set up for a
text change. The findText, replaceText variables are totally confusing
me, and I'm not sure what needs to be edited to make a tweaked
ReplaceInRange subsection interact smoothly with the ReplaceEverywhere
section. Trial and error thus far has not been fruitful, in my attempts
to integrate the formatting F&R script I sent with the ReplaceInRange
subsection.
This set of instructions in the Dictionary reminds me of the road signage of New Jersey -- intended not for someone arriving for the first time but for those who already live there.
Agreed. It's in the subsection of the site entitled Developers, you may
have noticed. I'll send out a cry for help to some more expert people,
but it will probably take a few days, if not more.