5
1
In Word 2010 I want text (eg. VIS - 1, VIS - 2, VIS - 3, etc.) to show in front of the page number in the Table of Contents. I prefer to include the text (e.g. VIS) in the footer in front of the page number.
5
1
In Word 2010 I want text (eg. VIS - 1, VIS - 2, VIS - 3, etc.) to show in front of the page number in the Table of Contents. I prefer to include the text (e.g. VIS) in the footer in front of the page number.
6
There is perhaps one way to achieve this, but it is a work around and is a bit complex to setup (however easy to use). It involves adding the prefix to each heading in the document as hidden text and formatting the TOC styles in a special way.
To setup the TOC and styles:
{ TOC \h \z \u }
. Add a \w switch to the field so it looks like { TOC \h \z \u \w }
. Press ALT+F9 to display field results again.To add the prefix to each entry:
Go to Font -> Color and change the color of the text to match the background (e.g white on a white document background). The prefix should be hidden and the heading should now look normal again.
Once this is done for all paragraphs right click on the TOC and choose Update Fields. Now each page number should have it's own prefix as shown in the image below.
Here is the sample output below. The first heading in blue shows the tab and prefix before hiding the text. The second heading shows the final output where the text is hidden.
An advantage of this method is you can choose any prefix you want and can also have separate prefixes for each entry if desired. Another bonus is if a heading does not contain any prefix, the TOC still looks pretty normal, the page number only appears a bit in from the edge of the page.
The trick to this work around is the \w switch instructs the TOC to include the tab found in the heading in the generated TOC entry. This first tab character aligns the dots to the first ruler tab that was set in Step 8 and is followed directly by the prefix. The next tab character is automatically added by MS Word when generating the TOC and aligns the page numbers to the edge of the page.
1
There's no way to have the table of contents automatically insert a prefix of your choosing before the page number. It's just not a supported feature.
However, you can insert chapter numbers. This may not be what you wanted since you gave an example of "VIS" which is not a number. But this mvps article describes how to do that: http://word.mvps.org/faqs/numbering/chapternumber.htm
For now, what you can do is edit the table of contents manually (treat it like it's regular text in a document and just type in it) and add in your desired prefix. But when you go to regenerate the TOC table, it will wipe out your changes. It's kind of unfortunate but I found a post by an MVP who said there's no way to enter your own text there, so I tend to believe them (especially considering I've been using Word in various releases for over a decade and have never seen this behavior in practice.)
See Stefan Blom's reply here for more.
If this is very important to your workflow and the issue isn't going to go away any time soon, you could probably do something with a Visual Basic macro that would go into the table of contents and manually edit the text to add that "VIS-" prefix as you want. If you decide you want to go that way, I'd ask on stackoverflow about how to write a macro to do that.