Results 1 to 4 of 4
  1. #1
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Hi all,

    A jillion years ago I put the Word command to edit a TOC on a toolbar. I then edited the toolbar description so the tooltip would be useful to the end user. I am now moving all the toolbar stuff to a Ribbon, but the appropriate command is lost to antiquity.

    Just to be clear, there is already a TOC in the document and when a user wishes to tweak what appears in it -- for example, displaying two levels of Headings instead of three -- s/he could click this button to run the <unknown> command, and the TOC dialog would appear, displaying the current TOC choices. When the user closed the dialog, s/he would get the familiar "Do you want to replace..." prompt. And the TOC was updated.

    Doing this manually, you would most likely right-click in the TOC field, choose "Edit Field...", then click the "Table of Contents..." button to display the TOC dialog. AND if I open the 2003 template in Word 2007, the old toolbar on the Add-ins Tab does exactly that, so it seems the command does still exist.

    Does anyone have a better memory (or ability to use search engines) than I?

    Thanks! ! !
    Kim

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by kmurdock View Post
    Just to be clear, there is already a TOC in the document and when a user wishes to tweak what appears in it -- for example, displaying two levels of Headings instead of three -- s/he could click this button to run the <unknown> command, and the TOC dialog would appear, displaying the current TOC choices. When the user closed the dialog, s/he would get the familiar "Do you want to replace..." prompt.
    I think you probably used "InsertTableOfContents" but whether it has the same name in Word 2007-2010, I do not know.

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    It is still called Insert Table Of Contents.

    In both version (2007 and 2010) you find it on the References tab Table Of Contents.

    It is also available as a command that can be added to the Quick Access Toolbar.

    [attachment=90204:TOC.gif]
    Attached Images Attached Images
    Regards
    John



  4. #4
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Thanks to both of you. And I think you must be right.

    I was hung up on putting it in VBA and the command Dialogs(wdDialogInsertTableOfContents).Show does not work the same way. If I run the command, Word seems to look for an existing TOC first and assumes I want to modify it. If I run the VBA code, unexpected stuff happens (or at least, it happens to me), even if I select the existing TOC first.

    Thanks again guys. I remain
    Kim

Posting Permissions

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