• Cross-reference field update problems (97/SR2, 2000/SP3)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Cross-reference field update problems (97/SR2, 2000/SP3)

    Author
    Topic
    #392243

    I am working in a very large document that incorporates cross-references. Our company has never used the cross-reference features before (the person who used them has a brother that is a programmer at Microsoft working on Office), so I am clueless. My problem is that I brought in text from two other documents, and the CRs did not fare well. Is there a fairly easy way to update them, so they correctly reflect the section/table that they refer to? Thanks

    Sims

    Viewing 2 reply threads
    Author
    Replies
    • #703483

      The only sensible way to fix these cross references is to delete them and insert them again.

      StuartR

    • #703516

      Hi Sims,

      Another way (I don’t know whether Stuart thinks its sensible) is to use INCLUDETEXT fields in your new document to link to the passages that you want from the originals. That way, your target document can more easily stay in synch with the others if they get changed. Your cross-references should come across OK, but (I think) they’ll be whatever they were in the source documents, rather than updating to take account of their location in the target document. Depending on what you want, that may be an advantage, or a disadvantage.

      Cheers

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #703524

        [indent]


        (I don’t know whether Stuart thinks its sensible)


        [/indent] I guess that depends on exactly what Sims is trying to achieve. If this is the 2000+ page document referred to in post 285868 then it’s going to be difficult whatever he/she does.

        If this is the same document then I would definitely fix the numbering problem before spending too much time on the cross references.

        StuartR

    • #703643

      Cross references are fields so updating them is as simple as selecting them and pressing F9. This can be done to the entire document at once if you select the entire document (Ctrl-A) before updating the fields. Is is possible the fields are locked and therefore preserve the cross-reference text incorrectly but this is unlikely.

      Stuart’s suggestion of deleting the cross ref and starting again is a sound solution for a one off fix but can be extremely timeconsuming if many cross-refs to the same location are all broken. In this case I would suggest you read on to get my interpretation of what causes the cross-refs to break and how you might fix them.

      If your cross-references have broken then you will need an understanding of fields and bookmarks to apply a fix that doesn’t involve deleting the reference and starting again. When you insert a cross-ref in a document to a numbered item, Word is putting a hidden bookmark (with a randomly generated name) at the start of the target paragraph and then places a Ref field in the source location which points at that named bookmark. It may also include a few field switches which make the source field a hyperlink and shows only the numbering of the target paragraph etc. You can see what this bookmark’s name is by clicking on the broken cross-ref field and pressing Shift-F9, or right clicking and choosing ‘Toggle Field codes’

      Another complicating factor is that if you insert two cross-refs to the same location, I think that Word might create two target bookmarks where one could have done exactly the same job.

      The fragility of the cross-refs becomes obvious if you have ever shown bookmarks on screen and tried inserting text at the start or finish of that bookmark. If you insert text at the start of a bookmark, the bookmark expands to include the new text. This is especially bad if the inserted text includes a paragraph mark. If you insert text at the end of a bookmark then the bookmark does not include the added text. If you insert text inside the bookmark then it does include the new text.

      Now with that understanding, how the cross-ref fields might break, and the respective fix is…

      1. Break = Instead of showing the paragraph number, the field shows 0. This is caused by the hidden bookmark now being positioned in a paragraph that is not numbered automatically. This could have occurred by you inserting text at the start of that paragraph OR by the target paragraph having lost its numbering. The fix can be as simple as following the hyperlink to find the now referenced paragraph and turning the numbering back on OR showing the field code and then placing a new bookmark in the correct location with the same name as the hidden bookmark that Word created (note hidden bookmarks include an _ at the start). This will replace the hidden one which has moved elsewhere. Then updating the fields once more will fix all cross-refs to the same hidden bookmark.

      2. Break = Error reference not found. This is caused by unknowingly deleting the text which contained the target of a cross-reference or by pasting in text from another document which contains a cross reference but not also bringing in the target text where the hidden bookmark was located. This can also be fixed by placing a bookmark in the correct location with the correct (hidden) name.

      3. Break = Incorrect location of link. Most likely caused by inserting text at the start of the bookmark but a very rare chance of being caused by pasting in text from another document containing a hidden bookmark with exactly the same name. Fix as per before.

      4. Break = cross-ref includes heaps of unwanted content. Caused by text being inserted inside (or at start of) hidden bookmark. Either replace the bookmark in the correct location or cut the included text from the bookmark and paste it above the intended location (not at the start of the target paragraph).

    Viewing 2 reply threads
    Reply To: Cross-reference field update problems (97/SR2, 2000/SP3)

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

    Your information: