Awesome ... thanks a lot!
I am trying to understand what this code is doing and wondering how I
could access the next-highest heading information - e.g. table is
contained in 3.2.1 and I would like to get the heading text of 3.2?
Thanks!
Joe
> Awesome ... thanks a lot!
>
> I am trying to understand what this code is doing and wondering how I
> could access the next-highest heading information - e.g. table is
> contained in 3.2.1 and I would like to get the heading text of 3.2?
They key to this is understanding what the \HeadingLevel bookmark does.
Wherever the current selection is, the \HeadingLevel bookmark stretches from
the heading paragraph above the selection (or including the selection, if
the selection is itself in a heading) to just above the next heading of the
same level.
Therefore, if you have found a third-level heading, and you want to find
it's parent 2nd-level heading, all you need do is position the selection
just in front of the start of the \Headinglevel bookmark, and then see where
it now reaches. It will wither reach to the previous 3rd-level heading, or
to the parent 2nd-level heading. You repeat this process until you reach the
2nd-level heading.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Joe HM - 17 Oct 2006 13:04 GMT
Hello -
Thanks so much for all the information ... that helped me a ton!
Joe
> > Awesome ... thanks a lot!
> >
[quoted text clipped - 21 lines]
> Please reply to the newsgroup
> Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org