Link to home
Start Free TrialLog in
Avatar of JasonLattin
JasonLattin

asked on

Heading style not showing in table of contents

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
Avatar of twohawks
twohawks
Flag of United States of America image

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.

;^)
Avatar of JasonLattin
JasonLattin

ASKER

twohawks,

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.
twohawks,

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!
ASKER CERTIFIED SOLUTION
Avatar of twohawks
twohawks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial