Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Generate a table of contents using paragraph numbers

1,032 views
Skip to first unread message

Barton Sheffield

unread,
May 19, 2003, 1:34:05 PM5/19/03
to
An end user wants to generate a table of contents based on
paragraph numbers instead of page numbers. I think it can
be done using the cross reference feature. Any ideas?

Margaret Aldis

unread,
May 19, 2003, 1:50:01 PM5/19/03
to

A table of contents for the numbered paragraphs will automatically
include the paragraph numbers - if you don't want the page numbers you
can elect not to show them.

If your user used styles to number their paragraphs, then you can build
the TOC using those styles. If they didn't then you will have to use TC
fields to mark the paragraphs to include (though for my money you'd get
a better return on the effort if you set up and apply numbered styles -
assuming other formatting requirements permit).
--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk
Word MVP FAQ site: http://www.mvps.org/word

Bruce Brown

unread,
May 20, 2003, 4:20:48 AM5/20/03
to
Hi Barton and Margaret -

I believe Margaret is doubly right when she says . . .

>(though for my money you'd get
> a better return on the effort if you set up and apply numbered styles -
> assuming other formatting requirements permit).

. . . because the TC field requires double work. When you revise a
heading marked by the TC field you must also change the contents of
the TC field manually. It doesn't update automatically, whereas the
built-in Heading styles do.

Margaret, having spent part of the day working on a TOC macro to hide
the page numbers and the dot leader tabs that precede them, I was
surprised by your comment that "if you don't want the page numbers you


can elect not to show them."

Frankly, I was unaware of any way to hide the dot leader tab and the
page number in a Table of Contents, and extensive playing around with
the Index and Tables dialog as well as the dialog to modify TOC styles
failed to reveal any such election. A quick reading of Help didn't
help either.

Would you be kind enough to indicate how this might be done? I'd
appreciate it (in spite of the time wasted on the macro). Word 2002.
As always, thank you very much.

- Bruce

=====================================================================

Margaret Aldis <margare...@mvps.org> wrote in message news:<ROd+QfVJ...@syntagma.demon.co.uk>...

Margaret Aldis

unread,
May 20, 2003, 8:57:31 AM5/20/03
to
Hi Bruce

To suppress page numbers:

From the GUI - When you first create the TOC or use Edit Field > Table
of Contents to get to the Table of Contents tab, just uncheck 'Show page
numbers'. (If you do have page numbers, you can also edit whether right
aligned, and if so what tab leader, if any - or you can do this from the
'TOC n' styles.)

From the field code - add the /n switch.

There are a huge range of options for TOCs - well worth looking very
carefully at all the combinations before writing any code <g>. The Help
is sometimes pretty obscure, but Suzanne has described many of the
switches in

http://www.mvps.org/word/FAQs/Formatting/TOCSwitches.htm

Hope this helps

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk
Word MVP FAQ site: http://www.mvps.org/word

On Mon, 19 May 2003, message from Bruce Brown <Empyrea...@aol.com>
said:

--

Shauna Kelly

unread,
May 20, 2003, 9:24:11 AM5/20/03
to
Hi Bruce

Ummm ... Insert > Reference > Index and Tables > Table of Contents tab. Un-tick the box that says "Show page numbers".

Or, add a \n switch: { TOC \n }.

This seems too simple. What am I missing?

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia


"Bruce Brown" <Empyrea...@aol.com> wrote in message news:1d2f086c.03051...@posting.google.com...

Suzanne S. Barnhill

unread,
May 20, 2003, 1:14:45 PM5/20/03
to
What you're missing is that you sometimes have to be creative. You have to
give a range for the levels you want to omit numbering for. If you want to
suppress numbering for just one level, you have to specify, say, \n 1-1.
Moreover, if you want to omit numbering for nonconsecutive levels (1 and 3,
say), you have to be even more devious: you have to reverse the styles and
levels so that Heading 1 is Level 2 (TOC 2) and Heading 2 is Level 1 (TOC
1), then suppress numbering for 2 and 3. And so forth. Obviously, there's no
way to do all of this from the GUI; some editing of the TOC field will
remain to be done.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA


Word MVP FAQ site: http://www.mvps.org/word

"Shauna Kelly" <Shaun...@ShaunaKelly.com> wrote in message
news:O5mcfGrH...@TK2MSFTNGP11.phx.gbl...

Bruce Brown

unread,
May 20, 2003, 1:34:01 PM5/20/03
to
Shauna -

Ummm ... er ... you're so right. All along it was right there under
my nose. Well, it wouldn't be the first time.

Actually, I don't regret writing the macro because it enables you to
remove page numbers from selected parts of the TOC, while leaving them
intact in other parts, which is sometimes a requirement in legal
Tables of Contents for Schedules and Exhibits.

What are you missing? Nothing! I'm the deficient one. Thank you
very much, Shauna (he said, wiping egg from his face). - Bruce

===========================================================================

"Shauna Kelly" <Shaun...@ShaunaKelly.com> wrote in message news:<O5mcfGrH...@TK2MSFTNGP11.phx.gbl>...

0 new messages