Any ideas on a macro that will automatically build a table of contents? I am
trying to avoid having to manually tag each page. Is there a way I can tag
the a certain part of each page, which will be updated when pages are added
to the document. Let me know if I'm not being clear. Any help is appreciated.

Re: Macro for Auto Table of Contents by Jonathan

Jonathan
Wed May 07 13:50:01 PDT 2008


"EddieLampert" <EddieLampert@discussions.microsoft.com> wrote in message
news:2BCD7821-0843-456D-A2A1-04B3C8B4D131@microsoft.com...
> Any ideas on a macro that will automatically build a table of contents? I
> am
> trying to avoid having to manually tag each page. Is there a way I can tag
> the a certain part of each page, which will be updated when pages are
> added
> to the document. Let me know if I'm not being clear. Any help is
> appreciated.

You don't need a macro for this. You need a TOC field. You can specify what
paragraphs go into the Table of Contents by specifying the field switches.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



Re: Macro for Auto Table of Contents by EddieLampert

EddieLampert
Wed May 07 15:14:03 PDT 2008

Thanks Jonathan. So if I specify with field switches, will I have to update
each time I add something that is to be included in the TOC? Can I set it to
the first line of the page (like a title) that is to be in the TOC, and not
include duplicates (if a "title" goes more than one page)? Thanks again.

"Jonathan West" wrote:

>
> "EddieLampert" <EddieLampert@discussions.microsoft.com> wrote in message
> news:2BCD7821-0843-456D-A2A1-04B3C8B4D131@microsoft.com...
> > Any ideas on a macro that will automatically build a table of contents? I
> > am
> > trying to avoid having to manually tag each page. Is there a way I can tag
> > the a certain part of each page, which will be updated when pages are
> > added
> > to the document. Let me know if I'm not being clear. Any help is
> > appreciated.
>
> You don't need a macro for this. You need a TOC field. You can specify what
> paragraphs go into the Table of Contents by specifying the field switches.
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
>
>
>

Re: Macro for Auto Table of Contents by JeanGuyMarcil

JeanGuyMarcil
Thu May 08 07:23:01 PDT 2008

"EddieLampert" wrote:

> Thanks Jonathan. So if I specify with field switches, will I have to update
> each time I add something that is to be included in the TOC? Can I set it to
> the first line of the page (like a title) that is to be in the TOC, and not
> include duplicates (if a "title" goes more than one page)? Thanks again.
>

I sense that you are not all that familiar with TOC in Word.
Basically, you can build a TOC based on paragraphs that are formatted with
certain styles, usually Heading 1 to Heading 9, but it can be any style. Or,
you can tag certain areas of the document with specialized fields and use
those fields to build the TOC. This is a bit more time consuming and advanced.
Also, you can link a TOC with certain part of a document using bookmarks,
thus generating more than one TOC per document.

For an overview see:
http://word.mvps.org/faqs/Formatting/TOCSwitches.htm