How to put MS Word headings on the same line in a TOC?

2

I have a book manuscript in Word 2017 with style "Heading 1" chapter titles and style "Heading 2" sections. I'd like to group the Heading 2s on the same line without page numbers, like so:

enter image description here

Some sites suggest I'd have to do this manually, which has obvious drawbacks. Is there a way for Word to do this automatically? Ideally, I'd be able to specify the symbol or text used between headings, such as the long dash in this example.

buttonsrtoys

Posted 2017-03-02T17:37:48.237

Reputation: 259

Answers

1

At the end of each chapter, you could include a TC field which instead of text includes a separate TOC which picks up Heading 2 styles only within chapter 1 (you can limit the area a TOC includes by including a bookmark switch). To get the em dash separators, I think you would have to find and replace ^p within this extra TOC field and then lock the field so it doesn't update back to lose the em dash separator if you update all fields in your document rather than just the main TOC). Add the switch \l 2 to this TC field so that the entries come into your main TOC as level 2.

The original TOC would be changed to pick up only Heading 1 style, as well as TC fields by adding the \f switch. To suppress page numbers for the Heading 2 entries that will be brought by in the TC field you've created by adding \n 2-2 (this instructs Word to omit page numbers in this main TOC for level 2 ie where your Heading 2 text will be)

Tanya

Posted 2017-03-02T17:37:48.237

Reputation: 1 400

Wow, that's a really slick solution. The only refinement I'd suggest is to insert the TC field that contains the TOC of H2s at the beginning of the chapter, not at the end (for example, add it right at the end of the paragraph for the chapter heading). That way, in the main TOC, if a user clicks the block of text that contains all the H2s, he or she will still go to the beginning of the chapter (just as if he/she had clicked the chapter heading itself), not the end of it. – cnread – 2017-03-07T02:09:42.153