Heading style not showing in table of contents

JasonLattin used Ask the Experts™
I am using a Heading 1 style to number chapters in a document. The chapter numbers do not appear in the table of contents when they are preceded by a hard page break. Can you help me determine what's causing the problem. There is more detail in the attached document.

Thanks in advance. ContentsHeading.doc
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Use the Show/Hide Formatting Marks (that backward "P" [paragraph] symbol]   on the  Standard toolbar tool to review.
Your problem seems to be the break at Section 3 is a simple page break, and not a bonifide Section break.

I am so sorry... I hadn't actually read your document thru.   strike me last comment ;^)
It works fine.  C

Tables of Contents don't update automatically when you add a new heading to your document. This is because a ToC is a field. To update a Table of Contents, put your cursor in the Table of Contents and press F9 to update it. Or ctrl-a F9 to update all fields in the document. In Word 2007 and Word 2010, if your table of contents is in a content control, you can use the content control to update the ToC.

Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.



Thanks for taking time to respond.

I fully understand that you have to update the TOC. However, even when I update using Ctrl+A + F9, the Chapter 3 in the document still does not appear in the TOC. As noted in the document, it appears that the problem is caused by the fact that a hard page break precedes Chapter 3. Before posting my questions, I had never noticed this before. My real issue is why won't the TOC update (when using Ctrl+A + F9) to display chapter numbers preceded by a hard page break? One other piece of information, as noted in the document, the TOC was knowingly inserted without using the content control you mentioned.

Any other thoughts about the logic behind why a section break is needed? I fully understand the use of section breaks for managing different headers/footers, page orientation, margins, etc; however, in the instance I have now, I prefer hard page breaks for reasons too lengthy to mention here.



I have some additional information.

I opened the document in Word 2007, updated the TOC, and Chapter 3 is shown correctly. The problem appears to be in Word 2010, which is my current install.

Is there a way to make 2010 work the same. There are a number of options in the Layout Options section (Word Options, Advanced, Layout Options at the bottom) that I don't understand. Would one of those options solve the problem? Which one? Maybe you know the meaning of all the options or have access to a definition of the options (they don't seem to be defined in Help).

Don't put a manual page break character ahead of it. Instead, click in the Heading 1 para, and change its paragraph format to include a page break before (right-click, Paragraph, Line and Page Breaks tab, Page break before.

I'm not sure why you sometimes need a page break and other times want a section break preceding your Heading 1 paras. If it's up to the user to decide when to do this, then create a macro that adds the Page break before to the selected para:

Sub PageBreakBefore()
    Selection.Paragraphs(1).Format.PageBreakBefore = True
End Sub

Assign a shortcut key to the macro (or put it in a button on the ribbon). Solved.

BTW, this is clearly a bug. I notice that it only arises when the Heading 1 paragraph contains no visible text -- just the para num. Try adding an "x" after the para number. Bingo! In the TOC. Now select the x and format it as Font, Hidden. Gone from the TOC!
I do not have 2010.
 lwebber, This must be a bug in 2010, you mean then, yes?
I opened the doc in 2003, btw, and it behaved with no issues, hence my last reply.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial