I am working With Microsoft Word VBA,macros,.net
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 that gives a result text
Master topic:sub-topic 1.
I have tried with range,parent ,Scope.Information(wdActiveEndSectionNumber) etc but nothing seem to work!!!
This recursive function works and the output is stored in heading and subheading.