• TOC error ‘bookmark not defined’ after mail merge (2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » TOC error ‘bookmark not defined’ after mail merge (2003)

    • This topic has 3 replies, 3 voices, and was last updated 20 years ago.
    Author
    Topic
    #419631

    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

    Viewing 2 reply threads
    Author
    Replies
    • #948100

      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.

    • #948101

      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
      [Fmr MS MVP - Word]

    • #948102

      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

    Viewing 2 reply threads
    Reply To: TOC error ‘bookmark not defined’ after mail merge (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: