When Peter applies a heading style to a paragraph in a document, that paragraph shows up in the Navigation pane and in any TOC he creates. If he applies a heading style to a paragraph inside a table, that paragraph does not show up in the Navigation pane and the TOC. Peter wonders why this occurs and if there is a way around it.
There are actually two separate items at play here: the inclusion of headings in (1) the TOC and (2) the Navigation pane. It is instructive to discuss each item in turn.
First, the inclusion of headings in the TOC. Headings within your document and within tables should automatically be included in a TOC if that TOC is based on heading styles and if those styles have been applied properly. The biggest potential "gotcha" here is that you may not apply the heading style to the entire paragraph of your heading.
When it comes to styles, the built-in heading styles are defined as Linked styles. This means that they can be applied to an entire paragraph or to any portion of a paragraph. What the style is actually applied to depends on what is selected when you apply the style. In other words, if you select (say) just a word or a phrase in your heading paragraph and then apply the style, it is only applied to that word or phrase, not to the entire paragraph. The problem is that only if the entire paragraph is formatted as a heading will it be included in the TOC.
The easiest way to make sure that you apply the Linked heading style to the entire paragraph is to NOT select any word or phrase in the heading paragraph. Instead, just place the insertion point in the paragraph and then apply the style. You could also, if desired, select the entire paragraph by triple-clicking within the paragraph text. Either way is fine; once you apply the heading style, it will apply to the entire paragraph.
Remember, as well, that if you make any updates to the heading formatting within the document, you'll need to update the TOC. Changes are not reflected automatically. (To update the TOC, right-click on it and choose Update Field.)
If headings in tables are still not showing up in your TOC, then it is possible that your document is exhibiting an early sign of corruption. You can verify this by creating a brand new document, putting some text in it (not text copied from the other document), adding a few tables and headings in it, and generating a TOC. The new document should show the headings from the table in the TOC just fine.
The second item is the inclusion of headings in the Navigation pane. The headings included in the Navigation pane are also only those in which the entire paragraph is formatted with the heading style. The biggest difference between what is included in the Navigation pane and in the TOC is that the Navigation pane does not include any headings in tables or in text boxes. This is a huge shortcoming to some Word users, but it is a shortcoming that has been in Word for years and years.
Unfortunately, there is no way around this shortcoming. The only possible suggestion is a workaround: Break your table into two and place the heading between the two tables as a regular paragraph. This obviously means more work in keeping multiple tables in sync with each other (relative to formatting issues, such as column widths), but it is the only known way to work around the shortcoming.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10146) applies to Microsoft Word 2007, 2010, 2013, and 2016.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
If your document is any length at all, adding a table of contents is a nice touch. This tip demonstrates how easy it is ...
Discover MoreThe TOC (Table of Contents) is generated by a field. This field may be updated in a macro using a single command line.
Discover MoreIf you inserted a bunch of TOC fields in your document, you can create your table of contents quite easily based on those ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-10-26 04:15:39
Esben Martiny-Bruun
Thank you, Allen! Would be really nice if word could soon make an update so headings inside tables was included in the navigation pane. I can't think of a single reason why it should not - can you?
2020-07-20 02:46:26
Sagar
It worked for me after selecting the numbering of the heading-> select format painter-> select the next heading(which is not getting updated in TOC)-> this applied the same formating of the previous heading which is already showing up in TOC. Now go back to the TOC and click "Update Table" and see if the new heading is showing up in Table. If it works, apply the same rule for all the headings.
2019-01-15 06:29:42
Ken Endacott
It is not strictly true that the entire paragraph must be formatted with a heading style in order for it to be included in the TOC. Provided the first character in the paragraph has a heading style then the TOC entry will comprise the text up to where the character style changes. If text later in the sentence is set to the heading style then it is not included. It only works if the paragraph style is a non heading style and the heading style is applied to characters. This is a method of displaying in the TOC only the first part of a long heading paragraph.
A sneaky way of displaying only the first sentence of a heading in the TOC:
1. Apply a non heading style to the whole paragraph
2. Select the first sentence up to the full stop but not including the space after the full stop.
3 Apply the heading style to the selection
4. Select the remainder of the text excluding the space after the full stop and excluding the paragraph mark at the end.
5. Apply the heading style to this selection.
6. Create the TOC.
Show the result someone else. They will go crazy trying to work how it is done.
2019-01-15 00:17:42
Freda
Excellent tip, Allen.
I appreciate Word Tips and have been using the information on your site for years.
I support your efforts by referring others to your site and by purchasing your books. (I finished about one-third of your book on VBA while waiting to be called for jury duty!) I also have your mail merge and a few others. I can't resist your end of year sales. I also subscribe to Excel tips.
If I found something that needed to be reformatted before I could understand it, I would reformat it myself, instead of criticizing you for not presenting it to me on a silver platter.
The fact that you have taken the time to
(1) do the research
(2) provide answers and
(3) maintain a website
with so much wonderful, well-organized content is something for which I will be forever grateful. I realize that tips.net is a business venture, but even your free content delivers a level of support far superior to that of Microsoft itself.
Thank you.
2018-10-03 15:50:18
Tim
Super helpful!
2018-05-29 13:42:18
beth
This article is too long and involved. Instead of long paragraphs, use bullet points and subheads. I cannot find any information in here! It is too much confusing information to read and a lot of it does not apply to what I am looking for.
2017-04-21 08:39:48
Dagny
Thanks for the tip! At least now I can stop trying and move on with this sad state of affairs in Word. :(
2015-11-25 07:09:18
Paul Franklin Stregevsky
Very useful contribution, Ken. Thanks.
2015-11-24 20:10:34
Ken Endacott
Heading styles typically have spacing before and after the paragraph and when used in a table causes the row height to increase which can upset layout. A custom style based on the heading style but with no before and after spacing will overcome this. However, the custom headings will not ordinarily show up in the TOC.
In a similar manner, a custom heading style might be needed where headings are numbered but a TOC entry is also required for unnumbered headings such as Introduction or Appendix.
To include custom heading styles in the TOC, when creating the TOC click the Options button and untick "Outline levels".
The "Outline levels" option puts a u switch in the TOC field which causes only styles with outline numbering to be selected but inbuilt heading styles will be selected even if they do not have outline numbering. A custom style even if based on an inbuilt heading style will not be selected with the u switch active unless it is actually given outline numbering.
There are a couple of other ways of including custom styles in a TOC that I won't elaborate on here. TOC generation can get complex if you stray outside of a vanilla TOC using inbuilt heading styles and it is not helped by quirks in the system.
2015-11-23 09:14:09
Jennifer Thomas
Thanks for that Alan -- for years I have been trying to figure out why the Navigation bar won't show heading in tables ... now I know & can cross that off my mental treasure-hunt list :).
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2022 Sharon Parq Associates, Inc.
Comments