Hi Gerry,
I was intentionally inserting the "</case>" into the end of the heading paragraph, rather than into the start of the one after it; otherwise, I'd have just used .InsertAfter without reference to .Characters.Last.
I also deliberately implement a loop in anticipation that the OP might want to add some other content in or around either or both of the "<case>" and "</case>" strings (e.g. the heading level and/or the index # of that heading). It would actually be more efficient to use ReplaceAll for what has been specified.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|