Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    TOC picks up entries, but not page numbers (Word 2000)

    I often work with documents where a TOC is in one file and the documents referred to it are in another file. We use RD fields to pull in the information. Ever since we upgraded from 97 to 2000, we have had several cases where the TOC entries themselves are pulled in, but where the page numbers should be, it says "Bookmark not defined" for each TOC entry.

    Sometimes if I close and reopen Word everything works correctly. But then if I make a change to the document and update the table of contents, the problem happens again.

    Is there any fixes for this bug or whatever it is?

    Thanks!!
    Troy

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC picks up entries, but not page numbers (Word 2000)

    <P ID="edit" class=small>Edited by Phil Rabichow on 05-Aug-02 21:19.</P>Edited to correct typo
    Hi Troy:
    The error that you're seeing generally occurs when your document fields need to be updated. Try selecting everything (Ctrl+A) & pressing F9 (to update the TOC field). That should correct the error.

    However, that doesn't explain why the field gives an error message when you first use the RD field to give you a TOC. Am I to understand that it pulls in the Headings only?

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC picks up entries, but not page numbers (Word 2000)

    As I said, the problem occurs AFTER we update the TOC. The headings appear, but the page numbers how [Bookmark not defined!]. For example:

    Test1............................................. .................................................. .Error! Bookmark not defined.

    Where "Test1" is a heading being pulled in correctly and "Error! Bookmark not defined." is the page number not being pulled in correctly.

    Let me reiterate steps I can take to consistently repeat the problem.

    1. Create a TOC with an RD field pointing to the files I want to include. TOC field is:

    [ TOC n 1-1 t "Heading 2,1, Heading 3,2, Module Introduction,2, Unit Introduction,2, Heading 4,4, Knowledge Title,5, Knowledge Title Top,5, Heading 5,6," ]

    2. Update the table of contents to include this information. Results are as above with error.

    3. Close all documents and that instance of Word.

    4. Reopen the document and update the table of contents. Everything looks fine.

    5. Make a change in the source document.

    6. Update the table of contents to include this information. Results are as above with error.

    7. Close all documents and that instance of Word.

    8. Reopen the document and update the table of contents. Everything looks fine.

    (You can repeat steps 5 through 8 again and again with the same results).

    Hope that helps!! Thanks!!
    Troy

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC picks up entries, but not page numbers (Word 2000)

    Hi Troy:
    You can delete the n switch, which creates a TOC without page numbers. I will try to look into this more later, as I'm running out of time, but I was able to recreate your situation. I think it has to do with the way Word uses temp files. You can avoid the problem by closing & saving the source file & then updating the TOC also.

  5. #5
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC picks up entries, but not page numbers (Word 2000)

    Phil,
    I know what the n does. It is in this by design. If you follow the n with #-# it prevents page numbers for those TOC levels. In this case on the first level.

    However, you are on to something when it comes to closing the file. What I found on closer inspection is this:

    Any time you update a field, including TOC, the exact same update command is accomplished on all documents you have opened that are referenced by the RD field. Take a look in the Undo list for the other open documents and you can see the same command as you issued in the active document. This must be messing everything up.

    If there is a setting that can turn this off that would be great. If not, we can just follow the workaround you mention of closing the source documents.

    Thanks!!
    Troy

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC picks up entries, but not page numbers (Word 2000)

    Hi Troy:
    I only have Word 97 to test right now. The problem doesn't happen in Word 97, so I'm not so sure it's a problem with temp files. My original thought, since I could find nothing on the Knowledge Base, is that when you change the source document, the hidden bookmark that Word uses was changed. Since changes are kept in a temp file until you actually save the document, I thought that the RD field couldn't find the bookmark & gave you an error. It certainly acts that way.

    However, if that were true, I would expect the same behavior in Word 97 (where you don't have the problem). In Word 97, when you update fields in one document, you do not update fields in all documents referenced by an RD field. I can't check Word 2000 right now, but I intend to look into this further. In Word 97, it seems that the RD field just goes into the referenced document, looks for headings (or other styles, tc fields, etc.) & creates the TOC.

    If I come up with anything else I'll post back.

Posting Permissions

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