List headings and subheadings differently in Word 2007

0

I'm trying to produce a table of contents looking like this :

Heading 1 ........................................... p. 1
    Subheading 1 -- p. 1, Subheading 2 -- p. 3, Subheading 3 -- p. 4,
    Subheading 4 -- p. 4, Subheading 5 -- p. 6
Heading 2 ........................................... p. 7
    Subheading 1 -- p. 7, Subheading 2 -- p. 8, Subheading 3 -- p. 8,
    Subheading 4 -- p. 10, Subheading 5 -- p. 11
Heading 3 .......................................... p. 12

And so on, in Word 2007.

Any ideas how I could achieve this? My current toc is generated using {TOC \o "1-3" \h \z \u}. I imagine the \p switch would work, assuming that I could restrict it to level-2 headings.

Clément

Posted 2012-04-19T10:09:20.403

Reputation: 740

Answers

1

I'm afraid you can't do anything like this. You would quickly run into the limitation that a TOC in Word inserts each entry as a separate paragraph, so that would make the second level of the TOC almost impossible to construct.

The only way to achieve this would be to create a macro which generates such a TOC for you. In other words when it's run it would iterate through each heading paragraph in the document and insert a TOC like you want for you.

Adam

Posted 2012-04-19T10:09:20.403

Reputation: 6 454