Given any selected word or paragraph in Word, is there a way to use VBA to find the text of the nearest preceding heading?
For example:
Heading Level 1: The Main Title This is a paragraph about the document. (A) Heading Level 2: A Sub Title This paragraph describes a detail.(B)
If any part of (B) is selected, I want to find "A Sub Title". If any part of (A) is selected, I want to find "The Main Title".