help on cross references in Word 2007

R

Ron37

I need help on cross references and how they are used in a Word document with
bookmarks, headings, etc. If you change the bookmark or a heading do you have
to delete the cross reference somehow and reinsert it manually in a Word 2007
document?
 
L

Lene Fredborg

You do not have to delete and reinsert the cross-references but you need to
update them.

If you use the built-in Heading styles (Heading 1-9) for your headings, you
can insert cross-references to those headings without manually bookmarking
the headings. In the Cross-Reference dialog box (opened via Insert tab >
Cross-rererence), all headings formatted with Heading styles will be listed
when you select Heading as the reference tab. Accordingly, you can select
e.g. Bookmark as the reference type and all manually inserted bookmarks will
be listed, ready for being cross-referenced.

If you turn on field shading (option found below Office button > Word
Options > Advanced category), you will see that a cross-reference is actually
a field. You can view the field code if you select the field and press
Alt+F9. If you insert a cross-reference to a heading, you will see that the
field code consists of something like:
REF _Ref223280573 \h
The _REF+number is the name of a bookmark that Word adds around the text to
which the cross-reference points.

If you have inserted a cross-reference to a heading or a bookmarked piece of
text and you change the heading or bookmarked text, you will need to update
fields: Select the entire document (Ctrl+A) and press F9 to update fields.
This updates the cross-reference fields so they reflect the changed content,
page number or whatever you selected to reference. If you delete a heading or
bookmark that has been cross-referenced, you will see that the
cross-reference field shows an error when updated. You need to delete such
fields.

Note, however, that you need to be careful in some situations when you edit
headings or bookmarked text that has been cross-referenced. Otherwise, the
_REF bookmarks may end up containing more or less text than it was supposed
to and your references will show something wrong. I have made some demos that
illustrates this and shows how to prevent such problems. See:
http://www.thedoctools.com/index.php?show=wt_cross-reference_trouble

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
R

Ron37

I believe the error when you update the field on a cross reference is Error!
Reference Source Not Found! I deleted a bookmark name and added another
bookmark name to the list of bookmarks and when I went to update the field
that error did come up. I did select F9 and Updated all the fields and got
the error. If you change the bookmark that you deleted for another bookmark
name how do you update field on the grey highlighted cross reference? I can't
make it work.
 
L

Lene Fredborg

Any cross-reference that points to a non-existing bookmark will show the
error message “Error! Reference source not foundâ€. The bookmark name inside
the REF field determines what to display. If you deleted the bookmark, the
field refers to nothing.

Example:
You have bookmarked the text “This is my bookmark†and you have named the
bookmark MyBookmark. You have created a cross-reference to MyBookmark. If the
cross-reference is defined to include the bookmark text, the field will now
show the text included in the bookmark, i.e. “This is my bookmark†(without
the quotes).

If you click in the field and press Shift+F9 to toggle field codes, the
field code will look like:

{ REF MyBookmark \h }

\h means that the field works as a hyperlink.

Let’s say you delete the bookmark MyBookmark and create a new one named
MyNewBookmark. You now want the cross-reference to reference the new
bookmark. All you need to do is to replace the bookmark name in the field
code and update the field so it looks like:

{ REF MyNewBookmark \h }

If you have many identical cross-references that need the same change, you
can toogle all field codes (Alt+F9). You can then use Find and Replace
(Ctrl+H) to search for the old bookmark name and replace it with the new one.
Update fields afterwards.

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
R

ron37

Can you use the Find and Replace option on cross references as well as
bookmarks? What if you use the format painter option to bookmarks and cross
references would you still have to update the fields to get all the
formatting in line when you do have a bookmark change? If you have a
hyperlink for a bookmark and you made a format painter change in the
hyperlink and then updated it you would still have to update the cross
reference to the hyperlink I believe.
 
S

Stefan Blom

You can search for REF (cross-reference) fields if you first display field
codes (press Alt+F9 to show/hide field codes). In the Find and Replace
dialog box, you can use ^d REF for "Find what."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top