Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Thu, 9 Oct 2008 15:13:00 -0700,    group: microsoft.public.word.vba.general        back       


add a new line in the middle of TOC   
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
date: Thu, 9 Oct 2008 15:13:00 -0700   author:   Associates

Re: add a new line in the middle of TOC   
"Associates"  wrote in message 
news:891FAC09-A64D-4C23-A7BE-E3E3248F0F40@microsoft.com...
> 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
>

Create two separate ToCs. One for the normal heading levels and one for the 
Appendix heading levels. Then you can put whatever text you want between 
them.


-- 
Regards
Jonathan West
date: Fri, 10 Oct 2008 00:26:22 +0100   author:   Jonathan West

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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us