Complicated Table of Contents - Word 2003

MelanieB
3StarLounger
Posts: 310
Joined: 19 Apr 2010, 16:18
Location: middle of the state of Washington

Complicated Table of Contents - Word 2003

Post by MelanieB »

Well, maybe it's just complicated to me. One of my coworkers wants an automated table of contents for a fairly large manual she is compiling. I've read about using lead-in heading styles. But, I'm not sure I'm doing it right. She only wants the number for the WAC and the title. What do you suggest? I was thinking of using fields, but I admit I'm not very good with those.

The text looks like this - Main heading centered, bold to appear the same way in the TOC (no page number beside it)
She wants the WAC number and title (197-11-010 Authority) only in the table of contents with a right-aligned, dot leader pg number.

PART ONE - PURPOSE/AUTHORITY
WAC 197-11-010 Authority. These rules are promulgated under the State Environmental Policy Act (SEPA), chapter 43.21C RCW. RCW 43.21C.110 specifies the content of these rules and grants authority for promulgation. As required in RCW 43.21C.095, these rules shall be given substantial deference in the interpretation of SEPA.



So the TOC should look like this (well, the page numbers will line up when it's generated - I know how to do that part):
PART ONE - PURPOSE/AUTHORITY
197-11-010 Authority……………………………………………………………………..2
197-11-020 Purpose………………………………………………………………………6
197-11-030 Policy…………………………………………………………………………8
PART TWO - GENERAL REQUIREMENTS

User avatar
HansV
Administrator
Posts: 78531
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Complicated Table of Contents - Word 2003

Post by HansV »

Use Heading 1 for the PART ONE etc. headings.
Enter the paragraphs with the WAC numbers in a non-heading style such as Normal or Body Text.
Then select the WAC number and title, and assign the Heading 2 style.

Now insert a TOC with dot leaders for the page numbers.
Press Alt+F9 to display field codes.
Insert the following into the TOC field, before the closing brace:

\n 1-1

Press Alt+F9 again, then F9 to update the TOC. The page number for the top level should disappear.
Next, modify the TOC1 style to be centered.

See the attached sample document.
TOC.doc
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

MelanieB
3StarLounger
Posts: 310
Joined: 19 Apr 2010, 16:18
Location: middle of the state of Washington

Re: Complicated Table of Contents - Word 2003

Post by MelanieB »

Thanks Hans. I tried this several times following your instructions, but I can't get the heading 2 to show up in the TOC. I don't understand the TOC switches well. this is what mine looks like:
{TOC \o "1-2'\h \ z\ u \n 1-1}

User avatar
HansV
Administrator
Posts: 78531
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Complicated Table of Contents - Word 2003

Post by HansV »

The \o switch specifies the levels that you want to include in your TOC. For example, \o "1-4" will include levels 1 through 4.

In your field code, you have a double quote before 1-2, but a single quote (apostrophe) after it. If you change the single quote to a double quote (and insert a space after it, but that's just for readability), it should work OK.
Best wishes,
Hans

MelanieB
3StarLounger
Posts: 310
Joined: 19 Apr 2010, 16:18
Location: middle of the state of Washington

Re: Complicated Table of Contents - Word 2003

Post by MelanieB »

I can't get the 2nd level heading to show in the TOC. Would you mind taking a look at the attached and let me know what you see wrong?

Thank you!
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78531
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Complicated Table of Contents - Word 2003

Post by HansV »

The problem is that the Heading 2 text doesn't start at the beginning of the paragraph - it is preceded by the word WAC formatted as "Txt". If you remove that (and the space after it), so that the Heading 2 text starts at the beginning of the paragraph, it'll be included in the TOC.

The alternative would be that you insert a TC field for each level 2 entry that you want to include in the TOC, but that's a manual process and very tedious...
Best wishes,
Hans