The add-in, like the other add-ins available from my web site is a macro enabled template intended to be inserted in the Word startup folder from where it is loaded into Word when Word is started, and replaces the TOC group on the References Tab of Word 2007 and later. A self extracting zip file will attempt to install the template in the default Word startup folder. Install the template with Word closed.
There are four buttons and two dropdown items:
The buttons are:
Although this is the first button on the form, it is actually the last to be used. This button places (or replaces) a TOC field at the cursor with the options selected from the Userform (below).
By default the Title and Heading 1 and 2 styles are selected, but you can select any of the available heading styles. You can also choose not to insert the values from TC fields in the Table of Contents by unchecking the check box.
Clicking the GM logo will link to this web page. The first time any one of the elements from the add-in, that employs a userform, is run, a standard disclaimer text is displayed:
This option does not work in conjunction with a userform. If there are Table of Content Entry (TC) fields in the document a Table of Contents based upon them will be inserted, with the option to replace an existing table of contents).
Clicking this button opens a dropdown menu with three further options
This option allows the user to mark selected texts in the document for inclusion in the Table of Contents.
The selected text is shown in the main text box of the above userform. If that text is not exactly what was intended, you can click back into the document (the userform will remain on screen) and then reselect the text. When the userform is again clicked, the text box is updated to show the new selection. Or you can simply type the required entry in the userform.
The userform allow for just the one entry to be marked, or all instances of the indicated text to be marked.
The heading level is used to set the indentation position of the inserted item in the Table of Contents. The next button allows that level to be changed.
Using this function you may change the heading level of the selected field (currently shown as level 1 in the illustration) or of all fields relating to the marked text.
This button opens a second dropdown menu
The first item is the most interesting of the options and it was a request by a Microsoft Answers Forum user for such a function that prompted me to develop this add-in.
It is used in conjunction with the 9 built-in Heading Styles to limit what is included from such a style in the Table of Contents. This is easier to demonstrate with illustrations than with text.
In the following illustration, are three heading paragraphs. The table of contents based on those headings will appear as shown below it.
Here I have used random text, but for the sake of argument I want to display only part of each heading in the Table of Contents. In the case of the first line, I want to include the text up to 'dolor'. In the second heading I want the text up to 'nibh' and in the third example I want the text up to 'magna'.
The Style Separator splits the paragraph at the cursor into two similarly formatted paragraphs with a hidden paragraph break. The first paragraph has the original style that will be used in the Table of Contents, the second has a new style based on the first paragraph style. The result is that only the first paragraph is included in the table of contents as shown below the example.
The final three buttons provide various viewing options to hide or display the workings of the add-in within the document. They have no effect on the document other than to change the view options so you can click through bthem to get a better idea of what they do.
I have felt that the tools provided in Word, at least since Word 2007, have not been the most intuitive and some of them have been hidden altogether.
The add-in featured on this page helps bring together the various Table of Contents tools in a format that makes it relatively simple to create a table of contents based on heading styles and/or marked text items.