Macro that formats (true title) case by Heading style
I have a macro I adapted from an online source that applies "true title" case to all text with a "Heading 1" style. It works wonderfully provided that Heading 1 text is not the last text in the document. The code is in test document attached - if you run the code, you'll see that it goes into an infinite loop. But if you add text after the Heading-styled text, it runs properly (although I just noticed that it produces a "code execution" error on the end select line after it finishes). The more puzzling issue is why it goes into the infinite loop if Heading 1 text is the last text. I tried a few "Loop Untils" but they didn't stop the endless looping. The wend has something to do with this but I can't figure it out. Can someone help?
|