Finding Out What the Current Section Is

L

Larry Lutz

For the life of me, I can find a way to determine what section of the
document the current selection is in. It seems like a simple task, but
somehow, I just can't seem to get the syntax right. I'm using a macro to
build a document, and I want it to do one thing if the current selection is
in Section 2 of the document and something else if it isn't, as in:

If Current Section = 2 then
Do one thing
Else
Do something else
End If

I need this macro to work in Word 2000, XP, and 2003. (We can't seem to get
everyone on the same version.) Any help that you can give will be most
appreciated.

Larry
 
D

Doug Robbins - Word MVP

Selection.Information(wdActiveEndSectionNumber)

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top