Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cross-reference problem (XP)

    Document has cross-reference to heading, but includes all text under that heading.
    Is there a way of correcting this without deleting and reinserting each cross-reference?
    How do I prevent this from happenning?

  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: Cross-reference problem (XP)

    I don't think you can avoid redoing it, unless there is a new way in Word 2002. A cross-reference creates a hidden bookmark for the REF field...something like {REF _Ref34451630}. There's no particular switch to change it to some other type of REF field.

    To prevent it from happening, you do the following steps:
    1. Insert/Cross-reference
    2. In the Reference type box, choose Heading
    3. In the Insert reference to box, don't choose Heading text. Choose Heading number, page number, etc..
    4. Then choose from the listed Headings & insert your cross references.

    One thing you might do to speed up the replacement, unless someone has a better idea, is to open both the Insert Cross-Reference box & the Edit/Find box. (First, press Alt+F9 to display field codes in the document.) In the find box, type

    ^019 REF

    You can then jump from one REF field to the next. As soon as you get to one, you can replace it with the proper type of cross-reference. Actually, after you find the first cross-reference, you can close the Find dialog box & search for the next occurrence by pressing Shift+F4.

    Maybe one of the VBA experts knows how to loop through all the headings, keep the heading numbers in some type of array, search for each ref field in turn, & then replace each with the heading number. Then again, I don't know if it's possible.

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Cross-reference problem (XP)

    > Maybe one of the VBA experts knows how to loop through all the headings, keep the heading numbers in some type of array,
    > search for each ref field in turn, & then replace each with the heading number. Then again, I don't know if it's possible.

    I don't think it is. I tried to do something very similar once, and it seemed that many of the _REFxxxxx fields didn't actually exist until I had used Word's Insert Cross Reference function to insert a reference to them <img src=/S/exclamation.gif border=0 alt=exclamation width=15 height=15> I could never find any consistency in this area, it just seemed that most of the _REFxxxxx fields existed but some didn't <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

    StuartR

Posting Permissions

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