Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
beanbabe beanbabe is offline
external usenet poster
 
Posts: 2
Default Table of Contents

Hi

i have my standard word doucment which has a Table of Contents in it. the
trouble i have is when i merge this document with my data which is in excel
and i am merging via OLE, it messes up my Table of Contents all the links
break down. Please can someone advise of a workaround for this.

Thanks
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Table of Contents

There are a number of Fields that (for good reason) do not survive the mail
merge process. The alternative is to create a "roll-your-own" vba
equivalent to mail merge where in place of a mail merge main document
containing the merge fields, you use a template containing DOCVARIABLE
fields and you use vba to iterate through the data source, creating a new
document from the template for each record in the data source, setting the
values of document variables in each letter to the values from the current
record, updating the fields in the document so that the data is displayed in
the DOCVARIABLE fields and then saving and closing the document before
repeating the process for the next and each subsequent record.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"beanbabe" wrote in message
...
Hi

i have my standard word doucment which has a Table of Contents in it. the
trouble i have is when i merge this document with my data which is in
excel
and i am merging via OLE, it messes up my Table of Contents all the links
break down. Please can someone advise of a workaround for this.

Thanks



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
beanbabe beanbabe is offline
external usenet poster
 
Posts: 2
Default Table of Contents



When you perform a mail merge to a new document, and the main document
contains a table of contents or a table of figures, you receive the following
error message, instead of page numbers, when you update the table:
ERROR! Bookmark not defined
Indexes and tables of authorities are not affected by this problem.

This does not happen when you perform the mail merge directly to the
printer. To work around this problem, use any of the following methods.
Method 1
Unlink the table of contents before merging to a new document. This converts
the TOC field to actual text, and the table of contents can no longer be
updated. If you want to update the table of contents, you must reinsert it.

Follow these steps to unlink the table of contents:
1. Place the insertion point within the table of contents.
2. Press CTRL+SHIFT+F9 (Windows), or the COMMAND key+SHIFT+F9 (Macintosh).
Method 2
Insert the table of contents after merging to the new document.
Method 3
Merge directly to the printer, instead of merging to a new document.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make labels from contents in a table i.e table of content lilhoot Microsoft Word Help 4 October 24th 08 05:51 PM
Table of Contents - 1 Table of Contents line is different to other treaders Microsoft Word Help 5 July 30th 08 12:57 AM
Inverting a Table of Contents (similar to pivot table) [email protected] Formatting Long Documents 1 September 21st 06 10:27 PM
Table of authorities and table of contents in same document? Trish Microsoft Word Help 1 November 2nd 05 06:27 PM
How do I set up a table of contents and chapter contents? Louis Garrett Microsoft Word Help 1 May 19th 05 05:06 PM


All times are GMT +1. The time now is 12:30 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"