The Word MVPs have a macro for replacing a text string wherever it appears in a document (including headers, footers and all other StoryRanges). I’d like to have a more flexible version that accepts a Range.Find object as an optional argument, allowing me to set Style, Font and other properties for the target text and/or replacement text.
This would be a straightforward task (I think) if I wanted to use a Selection.Find object as the argument (and use the Selection for all the macro’s searches), since the Selection.Find object has “sticky” settings. But to be able to use a Range.Find object as the argument (and search using Range.Find objects, as the MVPs macro does), I need to be able to jump the Range.Find from one RangeStory to another while preserving the other .Find properties (.Text.Style, .Text.Font, etc.).
It’s easy to move a Range.Find object around within a StoryRange — e.g., by using oFind.Parent.SetRange — without losing the .Find object’s other settings. But I don’t know of a way to jump it to a different StoryRange.
Besides the Selection alternative, I realize I could also write a supplemental MatchFindSettings macro that tediously adjusted all the settings of one Range.Find object to match those of another .Find object. But if there’s a direct way to move a Range.Find object to a different StoryRange, I’d love to hear it.