getting the heading of a selected text in word
- by Thunder
Hi,
I am working With Microsoft Word VBA,macros.
My question : Is there way to get sub-topic and master-topic that precedes a selected body text ?
Here is an example:
Master topic (level 1)
sub-topic 1 (level 2)
body text a
body text b body text c
sub-topic 2 (level 2)
body text d
body text e
Other MISC topics (level 2) body text f body text g body text h
Here if 'bodytext e' is selected I would like to run a macro and get the result as
'Master topic:sub-topic 1'
I have tried with range,parent ,Scope.Information(wdActiveEndSectionNumber) etc but nothing seem to work!!!
Thanks in Advance