Cross-reference Problems – Troubleshooting

This article helps you understand why problems may occur with cross-references and how to fix cross-reference problems in Word.

You may sometimes experience that one or more cross-reference fields in a document do not show the correct content. You may experience cross-reference fields that are not updated even if you changed the referenced item, e.g. a heading. The problem may also be that one or more fields refer to section no. 0 or a wrong number. Finally, the problem could be that one or more fields contain a lot of text where you expected a reference to a heading only. This article explains how these errors occur and how to manually repair and prevent them.

The article also introduces you to DocTools CrossReferenceManager – an advanced Word add-in that makes the work with cross-references much faster and easier and that can help you automatically repair and prevent cross-reference problems in the future.

​Latest updated 23-Oct-2019. Videos renewed in order to work without using Adobe Flash Player. Added info about additional problems and how to solve them: Problem 5 and Problem 6.

Word add-in ready for use

DocTools CrossReferenceManager - advanced add-in for Word

DocTools CrossReferenceManager is an advanced Word add-in that makes it easier and smarter than ever to work with cross-references in Word.

Free Trial icon
Word Add-In from DocTools

The add-in works with Microsoft Word 2010 and newer versions on PC/Windows.

DocTools CrossReferenceManager lets you do everything you can do using the built-in cross-reference functionality of Word easier and faster. In addition, DocTools CrossReferenceManager includes smart and efficient cross-reference features that are not found elsewhere.

For example, you can save language-specific custom cross-reference texts that contain placeholders for multiple cross-reference fields and insert the text, including all the cross-references, with a single click. See the example below (field shading is turned on to make it easy to identify fields):

You can insert a whole sentence with multiple cross-reference in one operation

Among the features are also special tools for detecting and handling cross-reference errors:

  • The add-in includes a command that checks the document for errors – such as the cross-reference errors described on this page – and provides tools for repairing any errors found.
  • In addition, the add-in includes functionality that can prevent certain types of errors.

You can access the functionality of the add-in from a custom tab in the Ribbon.

How to get the DocTools CrossReferenceManager add-in

This advanced add-in is not free but the return on investment is almost immediate. It will make all your future work with cross-reference faster and easier.

Click the button below to learn more about DocTools CrossReferenceManager or to buy the add-in.

You can try DocTools CrossReferenceManager risk-free for 7 days.

Manual troubleshooting of cross-references

Read below if you want to manually find and fix the cross-reference problems instead of letting the DocTools CrossReferenceManager add-in help you.

General tip about working with fields in documents

cross-reference is a field, i.e. set of codes that instructs Microsoft Word to automatically insert material into a document. The material can be text, page numbers, section numbers, graphics, etc.

Fields can be shown with gray shading on the screen so that it is easy distinguish fields from normal text. Note that field shading does not print. Field shading can be turned on via Tools > Options > View tab. You can select to have field shading shown NeverAlways or When selected. See the illustration below.

In case of Microsoft Word 2007, you will find the Field Shading option as follows: Office button > Word Options > Advanced category > Show document content group > Field shading.

In case of Microsoft Word 2010 or later version, you will find the Field Shading option as follows: File > Options > Advanced category > Show document content group > Field shading.

Turn on field shading

I recommend that you always show field shading when working with documents that contain fields.

If you cannot see the fields, you risk to make changes that are lost when you update fields. Setting field shading to Always also makes it much easier to find cross-reference problems, if any.

About the videos in this article
Note that the videos have originally been created using Microsoft Word 2003. However, the problems and solutions are precisely the same in all newer versions of Word – but the user interface is different. This means that the methods shown in the videos apply to Word 2007 and all newer Word versions too.

For example, the videos show the Bookmark dialog box. In Microsoft Word 2007 or later version, you can open the Bookmark dialog box via Insert tab > Links group > Bookmark. You can also press Ctrl+Shift+F5 to open the Bookmark dialog box.

The videos also refer to the display of formatting marks. Formatting marks can be toggled on and off in any version of Word using the shortcut Ctrl+Shift+8.

PROBLEM 1 – cross-references are not updated as expected

Situation: You have made changes to one or more headings or other items that are cross-referenced in the document. However, the cross-reference fields still show the old text even if you update all fields.

Word cross-reference problems - Cross-reference field has not been updated correctly

View the video below for an explanation of how the problem occurs and how you can solve it. The video also explains what to do in order to prevent such errors. The key to the problem is to be found in the way you edit cross-referenced items.

View video - learn how to solve the problem

As mentioned above, the video was originally created using Microsoft Word 2003. However, the problems and solutions are precisely the same in all newer versions of Word.


Note that the DocTools CrossReferenceManager add-in can automatically prevent or fix this problem.

PROBLEM 2 – cross-references refer to section no. 0 or show wrong numbers

If the problem occurs in relation to a cross-reference to a numbered paragraph in a table, see also Problem 4 below.

Situation: One or more cross-reference fields that should have referred to a heading number (or another numbered item) refer to section no. 0 after updating fields. Alternatively, one or more fields refer to a wrong number after updating fields.

Word Cross-reference problems - Cross-reference refers to section no. 0
Word cross-reference problems - Cross-reference shows wrong number

View the video below for an explanation of how the problem occurs and how you can solve it. The video also explains what to do in order to prevent such errors. As for problem 1 described above, the key to the problem is to be found in the way you edit cross-referenced items.

View video - learn how to solve the problem

As mentioned above, the video was originally created using Microsoft Word 2003. However, the problems and solutions are precisely the same in all newer versions of Word.


Note that the DocTools CrossReferenceManager add-in can automatically prevent or fix this problem.

PROBLEM 3 – cross-references contain too much text

Situation: One or more cross-reference fields that should have referred to the text of a heading or another item contain too much text after updating fields. You may even see e.g. tables or pictures included in a cross-reference.

Word cross-reference problems - Cross-reference contains too much text

View the video below for an explanation of how the problem occurs and how you can solve it. The video also explains what to do in order to prevent such errors. As for problems 1 and 2 described above, the key to the problem is to be found in the way you edit cross-referenced items.

View video - learn how to solve the problem

As mentioned above, the video was originally created using Microsoft Word 2003. However, the problems and solutions are precisely the same in all newer versions of Word.


Note that the DocTools CrossReferenceManager add-in can automatically prevent or fix this problem.

PROBLEM 4 – cross-reference to a numbered paragraph in a table refers to number 0 or a wrong number

Situation: You insert a cross-reference to a numbered item in a table. Instead of showing the number you selected, the cross-reference shows 0 or a wrong number after updating fields.

See the two illustrations below. In both illustrations, the cross-references that show 0 and A refer to the yellow 1. and 2. in the table and should have shown 1. and 2. Formatting marks are shown so you can see that the numbered paragraphs in the yellow column/paragraphs contain no text after the number and tab.

Word cross-reference problems - Cross-reference fields to numbered items in table cells refer to the wrong numbers - example 1
Word cross-reference problems - Cross-reference fields to numbered items in table cells refer to the wrong numbers - example 2

This problem is caused by a bug in Word that exists in all Word versions at least since Word 2003. The problem occurs if you insert a cross-reference to a paragraph for which the following is true:

  • The numbered paragraph is in a table
  • The paragraph is not the first paragraph in the first cell in the row
  • The paragraph is the last paragraph in the cell
  • The paragraph contains no text except the number

If all rules above apply, Word creates a wrong bookmark for the cross-reference as explained and illustrated below. Notice that the rules apply to the two examples illustrated above. In the first example, the numbered paragraphs are in the second column. In the second example, the numbered paragraphs are in the first cell in the row.

When you insert a cross-reference to a numbered item, the _Ref bookmark Word creates should enclose the text of the target paragraph only. But when the rules above apply, Word creates a bookmark that encloses the entire row in which the paragraph is found and the cross-reference will show the number of the first paragraph in the bookmark. This means that the inserted cross-reference will show whatever number is found in the first paragraph in the first cell in the row instead of the number you selected. If the first paragraph in the first cell isn't numbered, the cross-reference will show 0. Therefore, the cross-references in the illustrations above show 0 instead of 1. and A instead of 2.

If a cross-referenced, numbered paragraph is the first paragraph in the first cell in a row, the bookmark would still be wrong but you wouldn't notice because the cross-reference would fetch the number for the correct paragraph in that situation.

If a cross-referenced, numbered paragraph is not the first paragraph in the first cell in a row, but if the first paragraph in the first cell in the row happens to be numbered with the same number as the selected target for the cross-reference, you wouldn't notice the problem either but the cross-reference would actually show the number from the wrong paragraph.

The bookmark problem is illustrated below. The field codes of the first REF field are shown (above the arrow) and the bookmark has been selected in the Bookmark dialog box:

Cross-reference field shows wrong number because the bookmark encloses the entire row instead of the cross-referenced paragraph only

How to prevent or correct the problem

In order to prevent the problem with wrong cross-references to empty, numbered paragraphs in tables, Word must be forced to create correct _Ref bookmarks. You can solve the problem as follows:

  • Add a space in the numbered paragraph before creating the cross-reference

The space will cause Word to create a correct bookmark and thereby a correct cross-reference. You could add any other character than a space but a space will not be visible in the final document. See the illustrations below:

Cross-reference field shows wrong number because the bookmakr encloses the entire row instead of the cross-reference paragraph only

The solution with the space is only illustrated with one of the two examples above but it will work in all cases.

Cross-reference field shows wrong number because the bookmakr encloses the entire row instead of the cross-reference paragraph only

If you have already inserted cross-references that are wrong due to wrong bookmarks, the easiest solution is most likely to correct each instance by adding a space in the target paragraph as illustrated above, then delete the wrong cross-reference and create a new cross-reference.

Alternatively, you would have to correct each of the wrong bookmarks. To correct the bookmarks, follow the principles shown in the videos included with Problem 1, Problem 2 and Problem 3. You can manually delete the old and wrong bookmarks if you want to get rid of those bookmarks. They do not harm but they clutter the collection of bookmarks.

Note that the DocTools CrossReferenceManager add-in can automatically prevent or fix this problem.

PROBLEM 5 – cross-reference shows Error! Reference source not found

As explained and shown in videos for Problems 1-4 above, a cross-reference is a field that points to a bookmark. The cross-reference shows the content inside the bookmark in question.

If, for example, you have added a cross-reference to a heading, a bookmark is added around that heading text and the cross-reference field includes the name of that bookmark, thereby telling Word to show what is in the bookmark.

When you update fields in Word, you may experience that one or more cross-reference fields show the text Error! Reference source not found as illustrated below:

Cross-reference error: Error! Reference source not found

This problem occurs if the bookmark to which the cross-reference refers no longer exists. This will be the case if you have deleted the text to which the cross-reference pointed. When you delete content in Word, any bookmark within that content will be gone too. The result is that any cross-reference that refers to a bookmark that no longer exists will no longer be able to show relevant content. Instead, such fields will show the error text Error! Reference source not found. The source in this case was the deleted bookmark range.

NOTE
The problem will also occur if, for example, you have a cross-reference to a heading and you select the entire heading and type a new heading instead. The moment you start typing, the old heading will be deleted and the _Ref bookmark used by the cross-reference field to show the correct content will be gone. See below how to prevent the problem.

How to prevent the problem

If you want to edit a cross-referenced text, do not delete the entire text first. Instead, make sure to type the new content inside the existing text, i.e. within the bookmarked range, in order to preserve the _Ref bookmark. The videos for Problems 1-3 above will help you understand the details.

If you do need to entirely delete content that has been cross-referenced elsewhere in the document, you must fix the problem by removing the erroneous cross-references afterwards. See below.

How to solve the problem

Delete the erroneous cross-reference and insert a new and fresh cross-reference instead. If the cross-reference is no longer needed, simply delete the cross-reference and edit the surrounding text as needed.

Note that the DocTools CrossReferenceManager add-in can automatically find and help you fix this problem.

PROBLEM 6 – some cross-references show errors or wrong content when printing or creating a PDF

You may experience the following: Your document looks fine – you have checked everything. Then you print the document or create a PDF and now one or more cross-references show errors or wrong content. Other types of fields may also show errors or wrong content.

As explained and shown in videos for Problems 1-4 above, a cross-reference is a field that points to a bookmark. The cross-reference shows the content inside the bookmark in question. But note the following:

Cross-reference fields are not updated automatically while editing a document

You need to force the fields to be updated, e.g. by selecting all (Ctrl+A) and pressing F9 to update the fields.

If you have not updated fields before you print or create a PDF and if, at the same time, the option File > Options > Display > Update fields before printing is turned on, Word will update all fields when you print documents. Since creating a PDF is also a type of print, fields will also be updated when you create a PDF. The result may be that you now see one or more fields with errors or wrong content that you did not see beforehand.

The print or PDF reveals what the real content of the cross-reference fields (and other fields) is. The problem is not in the print or PDF – the problem is that you did you yourself make sure to update fields.

There may be special situations where you have a good reason to print without having fields updated. In that case, you could temporarily turn off the option File > Options > Display > Update fields before printing. However, I recommend that you always make sure to update fields before the final check of your documents.

The illustration below shows where to find the Update fields before printing option (the Word Options dialog box is set to a small size here).

Word Options - Update fields before printing

How to prevent the problem

You may prevent the problem by turning off the option File > Options > Display > Update fields before printing. I do not recommend that since it may give you a false picture of what is really in your documents. If you have the option turned off and if your document is opened and printed by other users with the option turned on, the fields will update when they print or create a PDF.

I recommend that you always make sure to update fields before the final check of your document. In case of any cross-reference problems, you can solve them following the procedures shown in Problems 1-5 above. Then printing and creating PDF will not show any surprises as regards cross-reference fields.

How to solve the problem

Before printing or creating a PDF, make sure to update fields in the document. Check all cross-references (and other fields) and correct any cross-reference errors by following the procedures shown in Problems 1-5 above. Then print the document or create a PDF as required.

Note that the DocTools CrossReferenceManager add-in helps you update all fields in documents. In addition, it can prevent or fix the different types of cross-reference problems.

Another way of repairing wrong cross-reference fields

The videos included with Problem 1, Problem 2 and Problem 3 above describe how to correct errors in cross-reference fields by correcting the _Ref bookmarks to which the cross-reference fields point.

Alternatively, you could delete each incorrect cross-reference field and replace it by a new field. However, this would leave the wrong _Ref bookmarks in the document and thereby clutter the collection of bookmarks.

Related information

You can learn more about cross-reference fields in the article How cross-reference fields in Word work at my wordaddins.com website.