Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    May 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    TOC error 'bookmark not defined' after mail merge (2003)

    Hi everyone,

    I have a problem where the Table of Contents page number are displaying an error "Bookmark not defined" after I have merged to file. The error does not appear until you either print or print preview. The error is described exactly in this MS KB127095 article for Word for Macs. I haven't found a similar KB for Windows version.

    I don't find any of the MS workarounds attractive & I was wondering if anyone has an alternative. My main problem is getting my document users to perform one of the workarounds. An automated alternative would be nice.

    Regards,

    Matthew

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: TOC error 'bookmark not defined' after mail merge (2003)

    The problem is that when you create a TOC, Word places hidden bookmarks in the document to keep track of the page numbers. Bookmarks in a document must be unique. When you perform a mail merge on a document that contains a TOC, the document is duplicated many times. This would cause a problem with the bookmarks, so they are removed during the merge.
    Basically, you shouldn't have a TOC in a document that is to be merged.

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: TOC error 'bookmark not defined' after mail merge (2003)

    Hi Matthew,

    One of the workarounds suggested in the MS article is to insert the table of contents after merging to the new document. Maybe, just maybe, inserting the table of contents while merging to the new document will also work. To test it, try wrapping your existing TOC with an IF test:
    {IF{MERGEREC}>0 {TOC o 1-3 h}}

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    Star Lounger
    Join Date
    May 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC error 'bookmark not defined' after mail merge (2003)

    Thanks Hans & macropod,

    For this type of document I tend to merge a single record at a time (odd but I have my reasons) so I tend to forget the logic of the TOC as explained by Hans.

    macropod I will give your idea a go.

    If I had even a drop of programming skills I would could probably automate inserting a fresh TOC into the merged document

    Regards,

    Matthew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •