Forum Discussion
Word 2016
has its own table of contents. The tables of contents have several
Levels, from 1 to 6. They are created using bookmarks (in the example "\b
inh_kap0_1). The bookmark names are customized for each chapter.
Some chapters have their main level in the second level, others in the
third. I would like to have a nested IF link in the table of contents
achieve that for certain chapters the tables of contents start in the second
level and for other tables of contents in the third level. The
means in my example: chapters 1.1, 1.2, 2.1, 2.2 and 3.1 should begin
in the second level, all others in the third. In other words: if the
combined IF condition is true (=1), the tables of contents in the
second level and the other levels are formatted accordingly
("Heading 2;1;Heading 3;2;Heading 4;3;Heading 5;4;Heading 6;5"). If the
If the condition is false (=0), the table of contents should be in the third level
begin and the further levels are formatted accordingly ("Heading
3;1;Heading 4;2;Heading 5;3;Heading 6;4").
So:
1.1
1.1.1
1.1.1.1,
but
1.3.1
1.3.1.1
1.3.1.1.1 and so on. The OR conditions are created with the + sign. The
AND links are created with the * character. Unfortunately, my result is that the
Tables of contents always start in the third level, even if the
Condition =1 results. I may have a syntax error in the TOC
Field.
I hope I explained it clearly.
Best regards, Laurel
- Charles_KenyonMar 17, 2023Bronze Contributor
Doug Robbins may be able to parse this. I'm afraid it is beyond my skill level.
One thing I would recommend would be creating the TOC fields you need and saving them in the TOC Gallery, perhaps in your template. Then use AutoText fields to incorporate them into your IF Field.
- Mar 17, 2023
Charles_Kenyon I think this is one for Macropod aka the Word Field Masochist
- Charles_KenyonMar 17, 2023Bronze Contributor
I was going to suggest him but he does not show up here that often.
Laurel, you may want to post your question in this Word forum. You will see a number of pinned posts there written by Paul Edstein (macropod) about fields. Before doing that, though, review : A Message to Forum Cross-Posters https://www.excelguru.ca/content.php?184.
If you post there, please put a link to this thread in your question as well as adding a link to the new post there. When your question is answered, it is your job to make a note of the answer in any other forum with a link.