- If your document looks like this,
can you automate a TOC that looks like this?
Yes, and I'll show you how, coming up.
Hi, I'm Deborah Savadra with LegalOfficeGuru.com,
your resource for using Microsoft Office
in a legal practice environment.
And I recently got a question from a reader
about a document she was working on
that she really needed an automated Table of Contents for.
She writes, I work in both a real estate
and transaction areas of law
and use table of contents rather frequently
and consider myself fairly advanced in using Styles.
I still have one issue
that I have not been able to figure out.
Would you please give me your professional opinion
on whether or not the TOC can look like the snippet below,
and if so, how to accomplish it?
She sent me a couple of visual snippets
to show me what her document looked like,
which I've mocked up here.
If you know anything about generating
an automatically updating table of contents in Word, though,
you immediately see a couple of possible barriers
to using Styles to populate that table of contents.
The article number and the remainder of the heading,
the first level heading, is separated
by a soft paragraph break in the text,
but needs to be separated by a tab in the TOC.
The number in the second level heading is bold in the text,
but needs to be not bold in the TOC.
Other formatting inconsistencies,
such as use of all caps and small caps,
don't necessarily preclude
using Styles to populate the table,
but the other two inconsistencies I just mentioned
already mandate that we use TC fields
rather than Styles to create our table of contents.
TC fields aka table entry fields for table of contents
are the legacy way of marking text
to include in a table of contents
left over from pre-Ribbon versions of Word.
While using Styles to populate a table of contents
is the preferred method, TC fields offer some advantages.
One, you can customize the content of the TOC entry.
In other words, it doesn't have to match exactly
with the text of the document itself.
Two, you can also customize at which level
your TOC entry will appear regardless of how it appears
in the hierarchy of the document.
And three, you can include TOC entries
that aren't based on headings.
Granted, TC fields are a little harder to set up,
but in situations like this where there are inconsistencies
between the way the entries appear in the document
versus the way they appear in the table of contents itself,
these fields give you some needed flexibility.
To build this table of contents to Carol's specifications,
I'm going to one, mark the first
and second level entries with TC fields;
two, deal with the content inconsistencies
between the headings and the document and the TOC entries;
and three, revise the Styles for the TOC entries
to include boldfacing, all caps,
or small caps as appropriate.
Before getting started, I need to turn on Word's
Show/Hide feature so I can see the non-printing characters,
which will also include the TC fields.
To do that, click the button that looks
like a paragraph character on the Home tab.
Microsoft really prefers you build your TOC with Styles.
They prefer it so much that they've literally
hidden the command for marking a TOC entry.
It's not available on the ribbon,
and unless you already know the shortcut key,
Alt + Shift + O, that's holding down
the Alt and Shift key simultaneously
and pressing the letter O,
you wouldn't have a clue how to insert a TC field.
if the shortcut key works for you, great.
However, I prefer to see this command on the ribbon
so I don't have to remember it.
To put that command on your References tab,
right click anywhere in the gray area of the tab
and choose Customize Ribbon.
That will bring you into the Options dialog box.
First, I'm going to add my new command group
to my References tab to hold this command and call it TOC.
I click New Group,
once I have References selected,
which it is by default the way I came in here,
and then click Rename to rename it.
Now, I have to find the Mark Entry command
to put into that command group.
Since I know what this command is called,
I can either choose All Commands or Commands Not in Ribbon.
And then scroll down the alphabetical list to find it.
Once I've found it, I can choose my new command group,
then choose Mark Entry and click Add
to add it to that new command group.
Once I've done that, I can click OK to finish.
And I'll see Mark Entry TOC on my References tab.
To mark a TOC entry,
simply select it with your mouse or keyboard
and either use the shortcut key, Alt + Shift + O
or the Mark Entry command you've just added to your Ribbon.
That will bring up
a Mark Table of Contents Entry dialog box.
In this example, you'll notice immediately,
it really only picked up the word Article
and the number after it.
That's because there's a paragraph break,
in this case, a soft paragraph break
inserted with Shift + Enter.
Here's the first of our manual adjustments,
typing in the remainder of the heading into the Entry field.
And now, here's the second
manual adjustment we need to make.
The TOC will need a tab character
between the article number and the text of the heading.
I can't insert that
within the Mark Table of Contents Entry dialog box,
but I can insert it within the resulting TC field.
To do that, though, I need to finish marking this entry.
I'm going to leave the table identifier as C.
And because this entry will be the first level of TOC,
I'll leave the level at one.
Then I'll click Mark to finish, and then Close.
Once I've done that, Word will insert a TC field
after the text I've selected.
The TC field is made up of three parts.
The text of the entry, as it will appear in the TOC,
within the quotes f or TC,
the table identifier, after the \f,
and the level, after the \l.
At this point, I can manually type a tab character
after the article number so it is included in the TC entry
once I insert the table of contents.
Now, because these two words are so close together
relative to the tab entry,
you're not going to be able to see that,
but I'm going to mark one more
and just show you how this ends up looking.
I'll mark another level one entry.
Mark Entry.
And then when I insert the tab, you'll see it there.
Now, let's see how our table of contents looks
with just these first level entries.
On the far left-hand side of the References tab,
I'll click Table of Contents, Custom Table of Contents.
That takes me into the Table of Contents dialog box.
First, I need to decide whether the entries
in the table of contents should be hyperlinked.
The advantage is that it makes
navigating within the document easier.
Both while you're editing,
you can control click to jump
directly to the reference text, and potentially,
once you've converted your document to a PDF.
The disadvantage, however, is that if you have any reason
to convert your table to text for more editing,
only necessary if you find the table contents feature
doesn't allow you to meet a certain requirement,
the converted text will also have hyperlinks,
which can be a bit difficult to remove.
The choice to uncheck the box is yours.
Within the Table of Contents dialog box,
click Options to open
the Table of Contents Options dialog box.
These steps are critical to getting
this particular type of table of contents right.
Because Microsoft prefers you use Styles
to build your table,
that's what selected by default here.
Uncheck both that box, and the Outline levels box,
since heading styles are usually
also linked to outline levels.
Then check the Table entry fields box, then click OK
to go back to the Table of Contents dialog box,
where you click OK again to finish
inserting the table of contents.
Immediately, I see one discrepancy
between my table and Carol's.
Her level one entries are all in caps in bold.
I could simply select the entire table and make that change
to the formatting to all caps and bold,
just manually, but that would be counterproductive,
because those changes would be undone
every time I refresh the table of contents.
Instead, I'm going to modify the Style
that controls the formatting of the level one TOC entries.
To find out what Style that is,
I'll use Shift + F1 to bring up the Reveal Formatting pane.
And when I click my cursor
inside any of those entries, I see this.
The paragraph style entry tells me
exactly what I need to know.
These entries are controlled by the TOC 1 Style.
So I click on paragraph style,
And that hyperlink takes me
directly to the Style dialog box.
Now, in some cases, more than one style
is applied to a particular piece of text,
and Word does its best to guess which one to modify.
In this case, it went automatically to hyperlink.
That's not the one we want to modify.
Instead, I'll scroll down to TOC 1
and choose that one, then click modify.
That takes me to the Modify Style dialog box.
I can do some formatting changes like boldfacing
within this dialog box, but to choose all caps,
I need to click Format, Font, to go to the Font dialog box.
Once I've chosen Bold and All caps,
I can click OK to make those font changes, click OK again,
and then click Apply to change the TOC 1 style.
Now, my table of contents' first level entries
are all in caps and boldfaced.
Now, we can start marking the second level entries.
The process starts the same way.
Select the text with your mouse or keyboard,
then use either Alt + Shift + O or the Mark Entry command
you've added to your References tab of the Ribbon.
The tab character that will need to appear
in the eventual TOC entry is already embedded
into the text of the document,
so there's no need to compensate for that
with these second level entries.
These will be level two entries,
so I'll choose that level
within the Level field and click Mark.
By the way, you can mark multiple entries in the document
while Mark Table of Contents Entry dialog box is visible.
Just scroll through your document,
select the text for your next entry.
Then when you click back into the dialog box,
the newly selected text is in the Entry field.
Check your table identifier and level, click Mark,
then move on to your next entry.
Click Close when you're finished.
Once I've marked all of my second level entries,
I can go back to my table of contents
and refresh it to add them.
To do that, I can either click
inside the table and press F9,
or I can right click anywhere within the TOC
and choose Update Field.
Either way, Word will ask me
if I want to just update the page numbers
or the entire table.
Because I've added new entries,
I want to update the entire table.
Once it's updated,
I need to compare it to the result Carol wanted.
I see two discrepancies.
One, Carol wanted the headings to appear in small caps.
These appear in mixed case.
This is something I'll need to fix in the TOC 2 Style.
Two, Carol wanted the entire heading to appear
in regular text rather than having boldface numbers.
This is something I'll need to fix
within the TC fields themselves.
Let's fix the second problem first.
Within each of the TC fields,
I'll need to remove the bold formatting
from each of the entries' numbers.
To do that, I'll select the numbers within each TC field
and use either Control + B to toggle off the boldfacing,
or use the Bold command button on the Home tab.
Once I refresh the TOC,
the numbers are no longer bold,
but they're still bold in the body of the document.
To force the second level TOC headings to be in small caps,
I'll modify the TOC 2 Style
using the same process I used for the TOC 1 Style,
namely go into the Modify Style dialog box
via the Reveal Formatting pane.
So I will find the TOC 2 Style,
click Modify,
Format, Font,
Small caps,
OK, OK,
Apply.
And once I've done that,
and my table of contents is refreshed,
everything looks as Carol envisioned it.
Before you refresh your table of contents one final time,
be sure to turn off Show/Hide by going to the Home tab
and clicking on that paragraph button to toggle that off.
Otherwise, your pagination
might be thrown off by the TC fields.
I told you earlier that Styles is really
the preferred way of building a table of contents,
but that the TC fields method also works
and gives you some flexibility with formatting and content.
But now you've seen that flexibility
can introduce some real complexity
into setting up the table of contents.
So that begs the question: is it worth it?
Your preferences are your preferences,
and you're absolutely entitled to them,
but the more inconsistencies you insist on
between your documents formatting or content
and your table of contents,
the more manual labor it takes to meet your requirements
and the less automate-able everything becomes.
So you have to ask yourself,
how much value are your exacting requirements
really added into the document?
Be honest.
Those are questions only you can answer.
And as I said, you're entitled to your preferences.
What you're not entitled to, however,
is any insistence that Word automate
your every formatting whim.
Word's pretty flexible, but it's not a mind reader.
I know that's uncomfortable for some folks to hear,
but it's reality.
If you'd like a copy of the sample document
I've just demonstrated,
head on over to my blog at the link in the description
and scroll down to the bottom of the post or click the link
in the upper right-hand corner of this screen.
This has been Deborah Savadra with Legal Office Guru.
Thanks for watching.
(chill music)