Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return Word "Chapter Number"

Status
Not open for further replies.

YoungTurk

Mechanical
Jul 16, 2004
333
US
Looking for a way to determine the "chapter number" for the current selection in the document (and write it to a variable). Although the outline property I refer to must be in the document properties somewhere in order to be used in the footer, I can't figure out how to access it.

The "chapter number" I'm referring to is what is put into the footer via the page numbering options and should be linked to the outline heading.

This task is dying to be automated, help!

Thanks.
 
Replies continue below

Recommended for you

Could your chapter number be the section number?
 
Unfortunately not, since I'm using a standard document format. I did get partial resolution with the following code; unfortunately it returns the bullet number associated to the first paragraph of the section so any extraneous paragraphs (spacers) will throw it off.
I may code it to cycle from 1 up until the string is not null.


Code:
ChapNumber = Selection.Sections(1).Range.ListFormat.ListString
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top