View Single Post
 
Old 04-01-2014, 03:45 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote