Get section number if selection in header/footer

M

Mark Tangard

Hi folks,

Is there a way to return the number of the SECTION whose header or
footer the cursor is in? Obviously (um, ok, not obvious to me til just
now), Selection.Sections(1).Index doesn't do it.

Thanks for any help.

Mark Tangard
 
T

Tony Jollans

I agree that it is not obvious that Selection.Sections(1).Index doesn't do
it - and I don't know of any use for what it does do, but ...

... what you want is Selection.Information(wdActiveEndSectionNumber)
 
Top