|
|
|
date: Thu, 9 Oct 2008 15:13:00 -0700,
group: microsoft.public.word.vba.general
back
Re: add a new line in the middle of TOC
On Thu, 9 Oct 2008 15:13:00 -0700, Associates
wrote:
>Hi,
>
>Just wondering if i can do the following in TOC in word 03.
>
>What i need to be able to achieve is
>
>Table of Contents
>
>Chapter 1 Introduction
>Chapter 2 What is DMFC?
>Chapter 3 ...
>...
>Chapter 10 Expression
> <--- wish to put a new line here before the Appendixes
>Appendix A Graph Projects
>Appendix B Some others
>
>Not sure if i need some codes to do this. Appreciates your help greatly.
>
>Thank you in advance
If you have one TOC field that's producing the entire table of contents, then
you could type a line into the middle of it; but as soon as you let the TOC
update, the added text would disappear. So the literal answer is no.
What you can do is fake it. Insert two bookmarks, one that covers the main part
of the document and one that covers the appendices. Then insert two TOC fields,
one with a \b switch pointing to the bookmark of the main document and the other
with a \b switch pointing to the bookmark of the appendices. See the "Partial
table of contents" section in
http://www.word.mvps.org/FAQs/Formatting/TOCSwitches.htm.
Then you can put any text in a regular paragraph between the two TOCs, and it
will stay there through updates.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
date: Thu, 09 Oct 2008 19:44:14 -0400
author: Jay Freedman
Re: add a new line in the middle of TOC
Thank you Jonathan and Jay for your replies.
Yes, it works well. Thanks for the ideas. However, there is another problem
i come across. The problem i think might be caused by the fact that we use
the bookmarks.
After having modified the TOC by splitting it into two TOCs, one for all the
Heading levels and the other one for Appendices as follows
{TOC \b chapters \h \z}
--- blank new line
{TOC \b appendixes \o \n 4-4 \h \z}
I went to add a few more appendixes and a few more Heading 2 levels to the
document. I then pressed F9 to update the field. The result was it didn't
update it. It was still the same as it was before. I think this is to do with
bookmarks. Because before assigning the bookmarks, i selected the portion of
the document and called it "chapters". And this did not get to cover the
newly added Heading levels to the document. How do i get around this?
Thank you in advance
"Jay Freedman" wrote:
> On Thu, 9 Oct 2008 15:13:00 -0700, Associates
> wrote:
>
> >Hi,
> >
> >Just wondering if i can do the following in TOC in word 03.
> >
> >What i need to be able to achieve is
> >
> >Table of Contents
> >
> >Chapter 1 Introduction
> >Chapter 2 What is DMFC?
> >Chapter 3 ...
> >...
> >Chapter 10 Expression
> > <--- wish to put a new line here before the Appendixes
> >Appendix A Graph Projects
> >Appendix B Some others
> >
> >Not sure if i need some codes to do this. Appreciates your help greatly.
> >
> >Thank you in advance
>
> If you have one TOC field that's producing the entire table of contents, then
> you could type a line into the middle of it; but as soon as you let the TOC
> update, the added text would disappear. So the literal answer is no.
>
> What you can do is fake it. Insert two bookmarks, one that covers the main part
> of the document and one that covers the appendices. Then insert two TOC fields,
> one with a \b switch pointing to the bookmark of the main document and the other
> with a \b switch pointing to the bookmark of the appendices. See the "Partial
> table of contents" section in
> http://www.word.mvps.org/FAQs/Formatting/TOCSwitches.htm.
>
> Then you can put any text in a regular paragraph between the two TOCs, and it
> will stay there through updates.
>
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
>
date: Thu, 9 Oct 2008 20:26:01 -0700
author: Associates
Re: add a new line in the middle of TOC
Most likely, what happened is that the newly added material isn't inside the
bookmarks, but after them. Select all of the material for one of the TOCs,
go to the Insert > Bookmark dialog, select the existing name, and click the
Add button. That will redefine the bookmark to include everything you
selected. Repeat for the other bookmark.
You can see the beginning and end of the bookmark by going to Tools >
Options > View and checking the box for "Bookmarks". They appear as thick
grey square brackets (which won't print).
Associates wrote:
> Thank you Jonathan and Jay for your replies.
>
> Yes, it works well. Thanks for the ideas. However, there is another
> problem i come across. The problem i think might be caused by the
> fact that we use the bookmarks.
>
> After having modified the TOC by splitting it into two TOCs, one for
> all the Heading levels and the other one for Appendices as follows
>
> {TOC \b chapters \h \z}
> --- blank new line
> {TOC \b appendixes \o \n 4-4 \h \z}
>
> I went to add a few more appendixes and a few more Heading 2 levels
> to the document. I then pressed F9 to update the field. The result
> was it didn't update it. It was still the same as it was before. I
> think this is to do with bookmarks. Because before assigning the
> bookmarks, i selected the portion of the document and called it
> "chapters". And this did not get to cover the newly added Heading
> levels to the document. How do i get around this?
>
> Thank you in advance
>
>
>
>
>
>
> "Jay Freedman" wrote:
>
>> On Thu, 9 Oct 2008 15:13:00 -0700, Associates
>> wrote:
>>
>>> Hi,
>>>
>>> Just wondering if i can do the following in TOC in word 03.
>>>
>>> What i need to be able to achieve is
>>>
>>> Table of Contents
>>>
>>> Chapter 1 Introduction
>>> Chapter 2 What is DMFC?
>>> Chapter 3 ...
>>> ...
>>> Chapter 10 Expression
>>> <--- wish to put a new line here before the Appendixes
>>> Appendix A Graph Projects
>>> Appendix B Some others
>>>
>>> Not sure if i need some codes to do this. Appreciates your help
>>> greatly.
>>>
>>> Thank you in advance
>>
>> If you have one TOC field that's producing the entire table of
>> contents, then
>> you could type a line into the middle of it; but as soon as you let
>> the TOC
>> update, the added text would disappear. So the literal answer is no.
>>
>> What you can do is fake it. Insert two bookmarks, one that covers
>> the main part
>> of the document and one that covers the appendices. Then insert two
>> TOC fields,
>> one with a \b switch pointing to the bookmark of the main document
>> and the other
>> with a \b switch pointing to the bookmark of the appendices. See the
>> "Partial
>> table of contents" section in
>> http://www.word.mvps.org/FAQs/Formatting/TOCSwitches.htm.
>>
>> Then you can put any text in a regular paragraph between the two
>> TOCs, and it
>> will stay there through updates.
>>
>>
>> --
>> Regards,
>> Jay Freedman
>> Microsoft Word MVP FAQ: http://word.mvps.org
>> Email cannot be acknowledged; please post all follow-ups to the
>> newsgroup so all may benefit.
date: Fri, 10 Oct 2008 11:17:37 -0400
author: Jay Freedman
|
|