# Problem with headings in ToC [closed]

I create Table of Content using Writer automatic tool, but complete first page is included in Table of Content although its style is Text Body (not Heading 1, Heading 2 etc...)

File example is here FILE EXAMPLE

I managed to solved problem by cutting the first page, generating table of content and then inserting page back... but I would like to know why is this happening.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2015-11-12 16:06:40.942854

Sort by » oldest newest most voted

Examining the XML there appear to be bookmark entries against all the text entries on the initial page e.g.,

<text:h text:style-name="P17" text:outline-level="1">
KORPORATIVNA STRATEGIJA
</text:h>


How this has come about I cannot determine. Perhaps via the use of direct formatting, as there are many direct format styles in use, or it may be related to how the ToC was initially inserted. There certainly do not appear to be any visible bookmarks available when attempting to insert a cross-reference. These bookmarks are being picked up by the ToC. To fix the ToC problem (and leave the bookmarks):

2. On the Index/Table tab under the Create from section de-select Outline and select Additional Styles; Click the ellipsis (...) button beside this last option.
3. On the Assign Styles dialog set the Heading 1 style to level 1 and Heading 2 style to level 2; Click OK.
4. Click OK.

To fix the bookmarks and the ToC:

1. Highlight all content prior to the ToC.
2. From the Apply Style pull-down menu select "Clear Formatting".
3. Save the file under a new name.
4. Close Writer.
5. Re-open the file.
7. Re-style the front page content as required (preferably using paragraph styles).
more

thanks... now it works... however, any idea why is this happening?

( 2013-11-02 19:10:38 +0200 )edit

I will update my answer to provide a clearer analysis.

( 2013-11-03 02:31:07 +0200 )edit

thanks... both approaches are good, and problem is solved..

( 2013-11-03 09:56:43 +0200 )edit

Thanks, had the same problem at the end of a document and solution 2 worked. Only I didn't even have to resave the doc.

( 2014-05-21 13:03:38 +0200 )edit

Yes, worked for me too. Thanks so much.

( 2019-04-19 10:37:16 +0200 )edit