Results 1 to 11 of 11

Thread: Word TOC Fields

  1. #1
    Topsy
    Guest

    Word TOC Fields

    When I create a Table of Contents in Word 2000 it automatically puts the Hyperlink Style on. I do not want the Hyperlink feature, I just want the regular TOC1, TOC2, etc. I don't know how to remove this Hyperlink - can anyone advise me. Thanks.

  2. #2
    BAM
    Guest

    Re: Word TOC Fields

    Hi Topsy,

    Use <Alt F9> to toggle the field codes and remove the /h switch from the TOC field.
    ~~~~~~~~~~
    Cheers!

  3. #3
    Topsy
    Guest

    Re: Word TOC Fields

    Thanks but when I toggle my field there is no h in it. What one of my field reads is HYPERLINK l

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Word TOC Fields

    Click here for a macro solution which was posted here some time ago.

    (And don't forget to use the handy Search feature to track down these things!)

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word TOC Fields

    After you delete the h, you need to regenerate the entire table - not just the page numbers - by updating the field (F9). Then they will go away. Or see the various VBA alternatives.

  6. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Word TOC Fields

    The TOC field will have an h switch in it that you can remove. The field that you were referring to was an individual line or entry in your TOC rather than the TOC field itself.

    {TOC h z t "Heading 2,2,Heading 2a,2"} is a TOC field.
    {HYPERLINK l "_Toc501741425"} is what I get if with field results (the TOC) displayed, I move the insertion point inside the TOC and press Shift-F9 to toggle the field codes. The rest of the TOC is still there and only the first line is changed.
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #7
    A.Rubin
    Guest

    Re: Word TOC Fields

    That's funny -- I'm using Word 97, I want links in my ToC, and I can't seem to generate them.

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word TOC Fields

    Hi A.

    How are you generating your TOCs? And are you using Heading Styles?

  9. #9
    A.Rubin
    Guest

    Re: Word TOC Fields

    There are three different ToC's, according to our document standards. The fields appear to be <font face="EraserDust">{</font face=dust>TOC o "1-1"<font face="EraserDust">}</font face=dust> , <font face="EraserDust">{</font face=dust>TOC t "Heading 8,1"<font face="EraserDust">}</font face=dust> , and <font face="EraserDust">{</font face=dust>TOC t "Heading 9,1"<font face="EraserDust">}</font face=dust> . Styles Heading 8 and Heading 9 are reserved for Figure titles and Table titles.

    I've generated them by
    (1) Insert >> Index and Tables >> Table of Contents (unchecking all styles except Heading 8 and Heading 9 for the latter types),
    (2) VBA (Document).TablesOfContents.Add ... (using Heading level 7 only for the latter two, as there are no (active) styles using level 7), and
    (3) VBA (Document).Fields.Add (Range), wdFieldTOC, ...

    The entries are fine for all methods, and page numbers are acceptable (although not identical to those in a heritage document), but there are no hyperlinks.

  10. #10
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Word TOC Fields

    In Word 97 the hyperlink is only on the page number itself.
    In Word2000 the hyperlink is the entire line.

    Are you sure there are no hyperlinks at all?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  11. #11
    A.Rubin
    Guest

    Re: Word TOC Fields

    You're absolutely correct. There are hyperlinks (now)...they are, however, just on the page number, not on the section number prepended to it.

    I could have sworn that they weren't there before, but....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •