Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Word / September 2007



Tip: Looking for answers? Try searching our database.

Table of Contents from headers.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
prinkster@gmail.com - 29 Sep 2007 03:41 GMT
Hello, I had a question about generating a table of contents from some
text in headers from different sections.  Basically, I have a document
that is broken into several different sections, all with a "title"
that is typed in the header differently per section.  I was wondering
if there is any way to generate a table of contents based on this
setup - I tried using a style in the header and generating a table of
contents that way, but it didn't work.  If there is a setting or Macro
of some sort to do this, that would be great.  Moving the title out of
the header is unfortunately not an option.  Thanks a bunch.
John McGhie - 29 Sep 2007 11:58 GMT
There is, but it's a truly disgusting work-around :-)

Headers cannot be included in the table of contents because they do not
exist on a particular "page", so Word cannot resolve a page number for them.

You really need to put the headings in the document and copy them into the
headers, not the other way around.

A) Type the heading and assign it the style Heading 1.
B) Now add a STYLEREF field in the header, and specify that it looks for the
most recent Heading 1 style.

The text of the heading will appear in the running header.  And since the
Heading is now on a page, which has a page number, it can be included in a
normal table of contents.

To do it the other way around, you need to:
1) put a bookmark around the header, then
2) use a cross-reference to bring the text into the text of the document on
the page where you want it,
3) assign it a style to bring it into the Table of Contents, and
4) set the style to have white text that is only one point high, so the
reader will not see it in the text.

I told you it was ugly...  Don't do it :-)

Cheers

On 29/09/07 12:11 PM, in article
1191033683.669038.45870@d55g2000hsg.googlegroups.com, "prinkster@gmail.com"

> Hello, I had a question about generating a table of contents from some
> text in headers from different sections.  Basically, I have a document
[quoted text clipped - 5 lines]
> of some sort to do this, that would be great.  Moving the title out of
> the header is unfortunately not an option.  Thanks a bunch.

Signature

Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group.  Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Nhulunbuy, Northern Territory, Australia
+61 4 1209 1410, mailto:john@mcghie.name

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.