Troubleshooting

A lot of these have been taken from the Help Dialog - Tips & Troubleshooting tab.


When inserting a Cross-Reference for a Chapter Title, it is inserting the bookmark, not the REF code

I have a Title for a Chapter in the style of Heading1. The same Text of that title also contains a bookmark.
The "Reference to insert" drop-down list is not working as expected.
I selected "Custom cross-reference text" but it has inserted a bookmark.
When I use the built-in cross referencing I am also seeing a bookmark, not the REF code.

This is not considered a bug but more of a Microsoft Word feature.
If a non-hidden bookmark exists and includes content that a cross-reference refers to, Word will use the existing bookmark instead of creating a duplicate.
A non-hidden bookmark is one not starting with an underscore.
In this situation you cannot choose which bookmark Word will automatically use.
If you want to choose which bookmark will be used, change the "type of target" to Bookmark.


Message "selected target item contains no text"

When inserting a cross-reference via the "Insert Cross-reference" dialog box, you may experience that a message appears, telling that the selected target item contains no text even if you selected a target item that shows text in the dialog box.
This may happen in the following situations:

  • You attempt to insert a cross-reference to a heading and have selected "Text" as the reference to insert.

  • You attempt to insert a cross-reference to a caption and have selected "Only caption text" as the reference to insert.

The problem occurs if the paragraph just above the selected target includes no real text and if, at the same time, that paragraph is formatted with the same style as the selected target item.
In that situation, Word incorrectly tries to use the empty paragraph as the target instead of the target item you selected.
To solve the problem, click "Cancel" in the "Insert Cross-reference" dialog box. Find and delete the empty paragraph above the desired target or, if you for some reason need to keep the empty paragraph, apply another style to it.
Then you should be able to correctly insert a cross-reference to the target item.


One or more captions are missing in the list of target items

One or more captions are missing in the list of target items in the "insert cross-reference" dialog box or caption is not listed as a target type at all
In order for a caption target item to be listed in the "Insert Cross-reference" dialog box (and in the standard "Cross-reference" dialog box), the following must be true:
1) The target item must include a SEQ field and the name specified in the field code must be one of the names available in the built-in "Caption" dialog box.
2) It does not matter where in the text the SEQ field is found. Even a paragraph that consists of only a SEQ field and a paragraph mark will be listed, provided the name in the field code is an existing caption name.
3) It does not matter which style is applied to the paragraph, i.e. the style does not need to be the Caption style.
4) It does not matter whether the caption, incl. the SEQ field in it, has been made manually or using the Insert Caption command.


Even if you know that your document includes caption(s), you may experience that "Caption" is not listed as a target type in the "Insert Cross-reference" dialog box, or you may experience that one or more target items are missing in the list of target items when you select "Caption" and then select the desired caption type (e.g. "Figure"). To find the cause of the problem, follow the list of checks below:
CHECK 1 -- DOES THE CAPTION INCLUDE A SEQ FIELD?
Check that a SEQ field is found in the caption paragraph in the document Correct the issue, if any.
CHECK 2 - HAS THE CAPTION LABEL USED IN SEQ FIELD CODE BEEN DEFINED?
Check that the name specified in the field code of the SEQ field is one of the defined caption labels. You can ad new caption labels via References tab > Insert Caption. For example, a caption with a SEQ field with the field code { SEQ Fig } will only be recognized if "Fig" has been added as a caption label.
IMPORTANT: Caption labels are stored in the Normal.dotm template and do not travel with documents. If, for example, a document that use custom caption labels is opened on another computer, the caption label(s) used in the document may not have been added on that computer.
CHECK 3 - IS THE CAPTION IN A TEXT BOX?
When retrieving target items via VBA (the programming language used in DocTools CrossReferenceManager), Word doesn't include target items that are found in text boxes. This is caused by a bug/deficiency in Word.
If this problem occurs and if you need to cross-reference a caption that is found in a text box, you can use one of the workarounds described below:


WORKAROUND 1 - GET RID OF THE TEXT BOX:
Word automatically inserts a caption in a text box if you have selected a floating shape, i.e. a shape that is not in line with text, when you insert the caption. Most often, there is no need to have captions in text boxes.
* You can prevent Word from automatically creating captions in text boxes by making sure that NO floating shape is selected when you select "Insert Caption".
* You can change a caption or another type of paragraph that is inside a text box to a normal inline paragraph by cutting it from the text box and pasting it where desired. Afterwards, delete the text box.


WORKAROUND 2 - INSERT CROSS-REFERENCE VIA THE BUILT-IN CROSS-REFERENCE DIALOG BOX:
If you want to/need to keep captions inside text boxes, you can use the standard "Cross-reference" dialog box to insert cross-references to those items. You can switch to the standard dialog box directly from the "Insert Cross-reference" dialog box.


WORKAROUND 3 - ADD A BOOKMARK:
You can manually add a bookmark around the heading or numbered paragraph in the text box you want to cross-reference. When inserting the cross-reference, select Bookmark as the type of target and your bookmark will appear in the list of target items. You can select from all the types of references to insert, incl. custom cross-reference text.



Headings and numbered paragraphs in text boxes do not appear in the list of target items

Headings and numbered paragraphs in text boxes are not directly "visible" to Word for cross-referencing.
This is caused by a bug/deficiency in Word. The result is that headings and numbered paragraphs in text boxes do not appear as target items neither in the built-in Cross-reference dialog box nor in the "Insert Cross-reference" dialog box.
See the workarounds below if you need to cross-reference such items.


WORKAROUND 1 - ADD A BOOKMARK:
You can manually add a bookmark around the heading or numbered paragraph in the text box you want to cross-reference. When inserting the cross-reference, select Bookmark as the type of target and your bookmark will appear in the list of target items. You can select from all the types of references to insert, incl. custom cross-reference text.


WORKAROUND 2 - GET RID OF THE TEXT BOX:
Maybe your text box is not needed. If you get rid of the text box so that the content is added directly in line with text in the document, the headings and numbered items will appear in the list of target items for cross-referencing.



One or more headings are missing in the list of heading target items

one or more headings are missing in the list of heading target items in the insert cross-reference dialog box or an inserted cross-reference shows data for another heading than the one you selected as the target
The two problems, PROBLEM 4.1 and PROBLEM 4.2, described below may occur in the following situations:
* The active document contains DELETIONS marked with tracked changes
AND/OR
* The active document contains EMPTY paragraphs formatted with a Heading style, i.e. headings that don't include any real text.
PROBLEM 4.1: One or more headings are missing in the list of target items.
This also exists in the standard "Cross-reference" dialog box.
PROBLEM 4.2: When you insert a cross-reference, the reference shows data for another heading than the one you selected as the target.
As explained below, the "Insert Cross-reference" dialog box contains a fix of each of the problems. However, it is not always possible to automatically fix the problems.
The problems are caused by a bug in Word. The bug prevents a heading from being automatically detected as a cross-reference target item if the first character(s) of the heading have been marked as a deletion OR if the heading contains no real text (PROBLEM 4.1 above). As a side effect, the bug may also result in a wrong cross-reference being inserted due to a missing heading in the list (PROBLEM 4.2 above) because Word doesn't use the same list to get cross-reference items as to insert cross-references! The two problems should not occur with other types of tracked changes than the deletions described above.


HOW TO FIX PROBLEM 4.1 - MISSING HEADING(S):
The solution depends on whether the problem is caused by (A) deletions or by (B) empty headings.
When the PROBLEM IS CAUSED BY DELETIONS MARKED WITH TRACKED CHANGES
If the active document contains at least one deletion marked with tracked changes, the "Insert Cross-reference" dialog box will include a button, "Fix Missing Headings". If you click the button and click OK in the dialog box that opens, the list of headings will be rebuilt so it includes all headings. This is handled by temporarily accepting all changes in the document, building the list and then undoing the acceptance of the changes. There is no need to click OK unless you experience one or both problems. The dialog box includes the needed information.
WHY ISN'T THE FIX CARRIED OUT AUTOMATICALLY EACH TIME THE "Insert Cross-reference" DIALOG BOX IS OPENED?
These problems are likely to occur rarely. The bug fix is implemented with the special fix button so it only costs time if needed, i.e. if you experience one or both problems. Otherwise, it would take time each time you opened the "Insert Cross-reference" dialog box in a document containing deletions.
When the PROBLEM IS CAUSED BY ONE OR MORE EMTPY HEADING PARAGRAPHS
It is not possible to fix this problem in the same way as is the case for deletions. If possible, this problem is attempted solved automatically by DocTools CrossReferenceManager by replacing a wrong result with a reference to the next heading until the result matches your selection in the "Insert Cross-reference" dialog box. However, it is not always possible to fix the problem automatically. If the automatic fix seems to have failed, a dialog box will tell you about the problem with the empty headings and how you can fix it:
1. Examine the use of styles in the document.
2. If a Heading style has been applied to an empty paragraph or a paragraph with only an automatic number and no text, delete the paragraph or change the style to a non-Heading style.
Alternatively, you can use the standard "Cross-reference" dialog box.


HOW TO FIX PROBLEM 4.2 - WRONG CROSS-REFERENCE:
This problem is attempted solved automatically by DocTools CrossReferenceManager by replacing a wrong result with a reference to the next heading until the result matches your selection in the "Insert Cross-reference" dialog box. However, it is not always possible to fix the problem. If the automatic fix seems to have failed, a dialog box will tell you. If the result is that a wrong cross-reference has been inserted, the solution depends on whether the problem is caused by (A) deletions or by (B) empty headings.
Is the PROBLEM IS CAUSED BY DELETIONS MARKED WITH TRACKED CHANGES
1. Delete the wrong cross-reference.
2. Insert the cross-reference again, this time using the "Fix Missing Headings" button first.
Alternatively, you can use the standard "Cross-reference" dialog box.
Is the PROBLEM IS CAUSED BY ONE OR MORE EMTPY HEADING PARAGRAPHS
1. Delete the wrong cross-reference.
2. Examine the use of styles in the document.
3. If a Heading style has been applied to an empty paragraph or a paragraph with only an automatic number and no text, delete the paragraph or change the style to a non-Heading style.
Alternatively, you can use the standard "Cross-reference" dialog box.
HOW TO TOTALLY PREVENT THE TWO PROBLEMS FROM OCCURRING
The two problems described above will not occur if you accept or reject deletions found in the start of headings or if no tracked changes are found at all AND if you make sure no empty paragraph are formatted with Heading styles.


Formatting of cross-reference fields

If a cross-reference field is not formatted as expected after it has been updated, you should turn on field codes of the field (Shift+F9) and check the field codes.
If the \* CHARFORMAT switch is present, the field will be formatted with the style applied to the first character inside the field code. Note that Word sometimes automatically adds \* MERGEFORMAT to a field when the field is updated.
This may happen if you apply direct formatting to the text. If both \* CHARFORMAT and \* MERGEFORMAT are found in the field code, the \* MERGEFORMAT switch will override the effect of \* CHARFORMAT if the formatting between the two conflicts.
You can remove the \* MERGEFORMAT switch from a field simply by deleting it from the field code (remember to update the field afterwards).
You can remove \* MERGEFORMAT from all cross-reference fields via Cross-reference Tools" > Remove MERGEFORMAT Switch from All Cross-reference fields.



What you can do if the "insert cross-reference" dialog box opens slowly

In order to be able to show only the target types that are relevant for the active document, the document needs to be examined before the "Insert Cross-reference" dialog box is displayed. In long documents, the check for "Heading custom" may take several seconds.
Via the option "Initially include 'Heading custom' in 'Type of target' list (for faster display of dialog box)" in the "Set Cross-reference Defaults" dialog box, you can change that. If you turn ON that option, "Heading custom" will always initially be present in the "Type of target" list in the "Insert Cross-reference" dialog box when it opens.
The check for "Heading custom" will not take place until you select "Heading custom" from the "Type of target" list.
A message box will appear if no "Heading custom" target items are found in the document.
This means that the dialog box will open faster in case of long documents. You will most likely not experience any difference in speed in shorter documents.
NOTE: From version 2.6, this option is turned on by default. You can turn it off/on as desired.



What to do if the enter key does not work as expected

Normally, pressing Enter inserts a new paragraph in Word. However, the Enter key works in special ways in some situations.
If you experience issues with the Enter key, it is useful to understand how two special options in DocTools CrossReferenceManager work:
The DocTools tab > "Cross-reference Tools" > "Set Cross-reference Defaults" dialog box includes two options related to the function of the Enter key: "Automatically fix bookmarks when typing Enter (to prevent certain cross-reference errors)" and "Switch style if pressing Enter in empty bullet/number paragraph". Those options settings apply to all documents.
If "Automatically fix bookmarks when typing Enter (to prevent certain cross-reference errors)" is turned ON, the behavior of the Enter key is managed by DocTools CrossReferenceManager. If turned OFF, Word itself is controlling the Enter key - then the Enter key works as if DocTools CrossReferenceManager was not installed.
The "Switch style if pressing Enter in empty bullet/number paragraph" option is only enabled if "Automatically fix bookmarks when typing Enter (to prevent certain cross-reference errors)" is turned ON.


HOW IT WORKS IF YOU TURN ON THE FIRST OPTION RELATED TO THE ENTER KEY BUT NOT THE SECOND
If you turn ON "Automatically fix bookmarks when typing Enter (to prevent certain cross-reference errors)" and turn OFF "Switch style if pressing Enter in empty bullet/number paragraph", the following happens if you press Enter while the insertion point is in a bulleted or numbered paragraph that has no text: A new paragraph is inserted. The style of the new paragraph will be the style defined as the "Style for following paragraph" in the style definition of the style applied to the original paragraph.
EXAMPLE:

The original paragraph is numbered. 
The style is "List Paragraph".
The "Style for following paragraph" for "List Paragraph" is also "List Paragraph".

RESULT of pressing Enter: The original paragraph remains unchanged. A new paragraph is inserted below it. The style of the new paragraph will also be "List Paragraph" because it is the "Style for following paragraph".


HOW IT WORKS IF YOU TURN ON BOTH OPTIONS RELATED TO THE ENTER KEY
If you turn ON both "Automatically fix bookmarks when typing Enter (to prevent certain cross-reference errors)" and "Switch style if pressing Enter in empty bullet/number paragraph", you must also specify which style to switch to in the related style field. You can select from two built-in styles, "Normal" and "Body Text" (the style names depend on your language version of Word). Alternatively, you can type the name of a PARAGRAPH style or LINKED style (i.e. a combined paragraph and character style) that you expect to be found in all documents you work with. If you specify the name of a built-in style, it will always exist, provided the language version of Word is not changed. If you specify a custom style, it may not exist in all documents.
Below, you can read about what happens in different situations if you press Enter while the insertion point is in a bulleted or numbered paragraph that has no text:
SITUATION 1:
If the style you specified as the "switch to" style in "Set Cross-reference Defaults" exists, the paragraph with the insertion point is applied that style.
EXAMPLE:

The original paragraph is numbered. 
The style is "List Paragraph".
The "switch to" style is set to "Body Text".
"Body Text" is a built-in style - it always exists.

RESULT of pressing Enter: The original paragraph changes to "Body Text" style. No new paragraph is inserted.
SITUATION 2:
If the style you specified as the "switch to" style in "Set Cross-reference Defaults" does NOT exist, it works as if "Switch style if pressing Enter in empty bullet/number paragraph" was turned OFF: A new paragraph is inserted. The style of the new paragraph will be the style defined as the "Style for following paragraph" in the style definition of the style applied to the original paragraph.
EXAMPLE:

The original paragraph is numbered. 
The style is "List Paragraph".
The "Style for following paragraph" for "List Paragraph" is also "List Paragraph".
The "switch to" style is set to "My Style".
"My Style" does not exist in the document.

RESULT of pressing Enter: The original paragraph remains unchanged. A new paragraph is inserted below it. The style of the new paragraph will be "List Paragraph" because it is the "Style for following paragraph".


IF THE ENTER KEY DOES NOT WORK AS EXPECTED IN THE "APPLY STYLES" DIALOG BOX
You may experience that pressing Enter in the "Apply Styles" dialog box does not apply the selected style but inserts a paragraph in the document instead. The problem is most likely that one or more other modeless dialog boxes are open too. As opposed to modal dialog boxes, modeless dialog boxes allow you to work in the document without closing the dialog box. Examples of modeless dialog boxes:
* The "Find and Replace" dialog box
* The standard "Cross-reference" dialog box
* The "Symbol" dialog box
To solve the problem with the Enter key in the "Apply Styles" dialog box, try to close any other open, modeless dialog box.


OTHER POSSIBLE ISSUES WITH THE ENTER KEY
A key can only be assigned to one command or macro. If you have other add-ins or code that also have assigned the Enter key to a specific command, the settings will conflict and only one of commands or macros assigned to Enter will run.
If you experience that problem or other problems with the Enter key, try to turn off the following setting:
DocTools tab > "Cross-reference Tools" > "Automatically fix bookmarks when typing Enter (to prevent certain cross-reference errors)".
When turned off, DocTools CrossReferenceManager does not influence the functionality of the Enter key.
When turned off, DocTools CrossReferenceManager cannot automatically fix the bookmarks but errors can be found and fixed via the "Check and Repair Cross-references" command.
If turning off the setting does not solve the problem, you may turn it on again and thereby take advantage of its functionality. Then the problem is to be found outside DocTools CrossReferenceManager.



One or more cross-reference fields are not updated as expected

IMPORTANT: PROBLEMS 8.1-8.3 listed below can easily be found and corrected using the "Check and Repair Cross-references" command.
PROBLEM 8.1: Cross-references are not updated as expected
If you have made changes to e.g. a heading that is cross-referenced in the document, you may experience that the cross-reference fields are not updated even if you update all fields. This may happen if you add text to the end of the cross-referenced paragraph. Such text will be added outside the bookmark used by the cross-reference field.
PROBLEM 8.2: Cross-references to a number are displayed as 0 (zero):
This problem occurs when the first paragraph in the bookmark that is specified in the cross-reference field isn't numbered. This may happen if you position the insertion point in the start of a cross-referenced paragraph and press Enter. The start of the bookmark will now be in the new paragraph instead of the original paragraph. If the new paragraph is not numbered, a 0 (zero) will be displayed.
NOTE: The "Set Cross-reference Defaults" dialog box includes the setting Automatically fix bookmarks when typing Enter (to prevent certain cross-reference errors). Turn on that setting to prevent PROBLEM 8.2
PROBLEM 8.3: Cross-references contain too much text
This problem may occur if you have added text inside a bookmarked range that is referred to by cross-reference fields.



One or more fields are not updated as expected - about locked fields

Fields can be locked. If a field is locked, this will prevent the field result from changing even if you update fields.
You can lock selected fields by pressing Ctrl+F11.
You can unlock selected fields by pressing Ctrl+Shift+F11.
If you experience that a field is not updated as expected, check whether the field has been locked. If you right-click a locked field, a disabled "Update Field" command indicates that the field is locked.
The "Update All Fields" command updates all fields in the entire document except fields that are locked.
If you find out that one or more fields have not been updated correctly and if locked fields are not the cause of the problem, try to select "Update All Fields" once or twice.



Highlight colors are not visible

Some commands in DocTools CrossReferenceManager rely on the use of different highlight colors.
Display of highlight colors can be turned on and off via a Word option.
The display must be turned on to see the highlight colors.
When you apply highlight via a command in DocTools CrossReferenceManager, display of highlight will automatically be turned on.
You can also turn on display of highlight via the "Cross-reference Tools" menu in the DocTools tab in the Ribbon.



Highlight disappears when updating fields

If you update fields using the built-in functionality (F9) you may experience that e.g. red or green highlight that has been applied to a cross-reference field disappear when fields are updated.
That is standard Word behavior.
However, if you update fields using the "Update All Fields" command in the "Cross-reference Tools" menu, the highlight will be retained.
The highlight of cross-reference fields applied via the DocTools CrossReferenceManager commands is primarily meant to make it easy for you to locate cross-reference fields when checking for issues.
Once you have handled the issues marked by highlight you can select "Remove Highlight from All Cross-reference Fields" to make sure the highlight is removed from both field results and field codes.



Red highlight on last paragraph in table cell is not found

red highlight on last paragraph in table cell is not found by "find red highlight in bookmarks" or "find red highlight in cross-reference fields"
If the paragraph mark of a numbered/bulleted paragraph is highlighted, the number or bullet of the paragraph will be highlighted too.
Word is not able to find such highlight of a number/bullet in case of an empty paragraph at the end of a table cell.
If you have applied red highlight during check of cross-reference bookmarks, highlight could be applied to such paragraph.
The highlight will not be found by the "Find Red Highlight in Bookmarks" and "Find Red Highlight in Cross-reference Fields" commands.
To remove such highlight, you can select the entire cell and select "No Color" from the Highlight tool on the Home tab of the Ribbon.
Alternatively, add a single space to the paragraph and select "Find Red Highlight in Bookmarks" or "Find Red Highlight in Cross-reference Fields" again - then the highlight can be found.



When selecting "insert cross-reference", the dialog box is very large or word seems to hang and the dialog box is not visible

when selecting "insert cross-reference", the dialog box is very large or word seems to hang and the dialog box is not visible
Normally, the "Insert Cross-reference" dialog box will open with the position and size it had most recently.
This is handled by storing information about the position and size when you close the dialog box.
However, if you are using another monitor setup than last time you used the "Insert Cross-reference" command, e.g. switched form two to a single monitor, you may experience that the dialog box does not appear on the screen.
The most likely cause is that the dialog box is open but shown outside the visible area of the screen.
Since the dialog box has the focus, you cannot do other things in Word until it has been closed and this gives the impression that Word is hanging.
To fix the problem, do as follows:
1) Press the Esc key to close the invisible "Insert Cross-reference" dialog box.
2) Select the command Cross-reference Tools > "Restore Position and Size of Insert Cross-reference Dialog Box" and click YES. This will restore the dialog box to the default position and size. Once the position and size are restored, you can select the "Insert Cross-reference" command and the dialog box should be fully visible on the screen and appear with the correct size.


How to make cross-references look like hyperlinks

You may want to make cross-reference fields look like hyperlinked text.
However, even if you apply the built-in style "Hyperlink" style to a cross-reference field, Word does not display the field with the characteristics of the style (by default blue and underlined).
Therefore, the built-in "Hyperlink" style has been removed from the styles shown in the "Style" list.
Note that you can let DocTools CrossReferenceManager automatically create and apply a custom character style, "Hyperlink Special", which looks as the "Hyperlink" style.
The "Hyperlink Special" style will be based on the "Hyperlink" style. This means that "Hyperlink Special" will automatically change if you modify the "Hyperlink" style.



When browsing fields or checking for errors, the selected bookmark or field is not always shown close to the top of the window

Whenever possible, DocTools CrossReferenceManager will attempt to scroll so that a selected cross-reference bookmark or cross-reference field is shown close to the top of the window when you use commands for browsing or checking cross-references.
However, this is not always possible, e.g. if a bookmark or field is close to the end of the document or in a footnote or a footer.
Then the selection may be closer to the bottom of the window instead.
TIPS IF YOU CANNOT SPOT WHERE THE SELECTION IS: First try to move the dialog box to see whether the selection is hidden behind it.
If the selection contains a field, try clicking the "Show/Hide Field Code" button in the open dialog box, if found. This may make it easier to find it.



If random text and lorem ipsum text does not work as normally

Normally, if you type "=rand()" or "=rand(x,y)" where x and y represent numbers, followed by Enter, Word will insert random text.
Correspondingly, if you type "=lorem()" or "=lorem(x,y)" where x and y represent numbers, followed by Enter, Word will insert "lorem ipsum" text.
If you experience that this does not work, try first to type a space just after typing Enter. If that does not make the random text appear, try to temporarily turn off the following setting:
DocTools tab > Cross-reference Tools > "Check and Repair Cross-references".
You can turn on the setting again after you have inserted the random text or ipsum text.



Some characters in custom texts appear as ?????, also when inserted in documents

Your default settings and custom cross-reference texts are stored in configuration files that are automatically created by DocTools CrossReferenceManager.
If you started using a version of DocTools CrossReferenceManager EARLIER than version 2.53, the configuration files have been saved with ANSI encoding that is not able to store all types of characters.
Each character that is not supported will appear as a question mark, ?, also when fetched by the add-in later.
This problem applies to e.g. some Greek or Hebrew characters.
To allow all characters to be stored in the configuration files, the encoding must be changed to Unicode.
The ANSI character set supports a little more than 200 different characters whereas the Unicode has the potential of supporting more than one million unique characters.
Since version 2.53, the configuration files will automatically be saved with Unicode encoding.
See the instructions below about how you can change your configuration files from ANSI to Unicode encoding if needed. Note that the configuration files can remain in ANSI encoding without problems if you never need to store data with non-ANSI characters.
Follow the instructions in METHOD 17.1 or METHOD 17.2 below if needed. It requires only a few minutes but the instructions are detailed to make it as clear as possible


METHOD 17.1 - FIX THE PROBLEM BY DELETING THE CURRENT CONFIGURATION FILES AND LET DocTools CrossReferenceManager AUTOMATICALLY CREATE NEW FILES IN UNICODE FORMAT
NOTE: If you use this method, you will need to create custom texts again since the existing texts will be removed.
The custom texts are stored in a file named "DocTools CrossReferenceManager Custom Texts.ini". Other personal information is stored in a file named "DocTools CrossReferenceManager Custom Texts.ini".
1. Exit Word.
2. Open a File Explorer window and go to Word's STARTUP folder (see the following article if needed: https://wordaddins.com/support/how-to-find-the-word-startup-folder/).
3. In the STARTUP folder, open the folder "DocTools CrossReferenceManager Setup".
3. Open one of the configuration files using a text editor such as Notepad (most likely available if you right-click the file).
4. In the file window, select File > Save As.
5. In the bottom of the Save As windows, click the Encoding field and select Unicode instead of ANSI.
6. Click the Save button. When asked whether you want to replace the existing file, click YES.
7. Repeat Steps 3-6 with the other configuration file.
8. Start Word and you should be ready to insert cross-references. You can edit the custom texts that have the ????? characters as needed and replace with the desired characters.
TIP: If you want, you can open the old configuration files using a text editor such as Notepad to see what is in them - they just contain text.


METHOD 17.2 - FIX THE PROBLEM BY OPENING THE EXISTING CONFIGURATION FILES AND SAVE WITH ENCODING UNICODE INSTEAD OF ANSI.
NOTE: This method allows you to keep the existing data in the configuration files. But you will need to correct any ????? data either directly in the configuration files or via Define Custom Texts in DocTools CrossReferenceManager.
1. Exit Word.
2. Open a File Explorer window and go to Word's STARTUP folder (see the following article if needed: https://wordaddins.com/support/how-to-find-the-word-startup-folder/).
3. In the STARTUP, rename the folder "DocTools CrossReferenceManager Setup" to something else (e.g. DocTools CrossReferenceManager Setup OLD) - you can delete the folder later but keep it in the first place. That folder contains the two configuration files.
When you have renamed the folder, DocTools CrossReferenceManager will not find it and will therefore automatically create a new folder and two new configuration files in Unicode format.
3. Start Word and you should be ready to insert cross-references. Since the folder with the configuration files has been renamed, you will be asked to define default settings again. Also, you will need to create custom texts again. A new configuration file "DocTools CrossReferenceManager Custom Texts.ini" will be created the first time you create a new custom cross-reference text.
TIP: If you want, you can open the old configuration files using a text editor such as Notepad to see what is in them - they just contain text:
If the new version works for you, you can just delete the old "DocTools CrossReferenceManager Setup" folder you renamed in Step 3.



No style is applied to an inserted custom text even if it includes style tags, <$> and </$>

Style tags in a custom text have effect ONLY if the 'Style' check box in the "Insert Cross-reference" dialog box is turned ON when you insert the custom text.
Otherwise, the style tags are ignored. This way, you have full flexibility:
You can use the same custom text definition to insert the custom text with or without applying a character style, simply by having the 'Style' check box turned on or off.
If a custom text does not include any style tags and if the 'Style' check box in the "Insert Cross-reference" dialog box is turned ON when you insert the custom text, each cross-reference field in the custom text will be applied the character style in question.



When inserting a custom text, the result includes <$> or </$>

The strings <$> and </$> are used in custom texts as style tags. You may insert more than one pair of style tags in a custom text. However:
The Style tags must be used in pairs - a 'Start Style' tag also requires an 'End Style' tag.
If two or more pairs of style tags are found, an 'End Style' tag must always come before the next 'Start Style' tag, i.e. the tag pairs cannot be nested.
If you see <$> or </$> in the result when inserting a custom text, it indicates that the custom text does not include correct pair(s) of style tags.
You may also by accident have changed a style tag so it does not exactly match the correct syntax: <$> and </$>.
Edit the custom text in question to fix the problem. Then replace the inserted custom text with a new one.
Example of a custom text with correct style tags:
For further details, please refer to Section {N}, "<$>{T}</$>", page {P}.
<$>For further details, please refer to Section {N}, "{T}", page {P}.</$>
For further details, please refer to <$>Section {N}, "{T}", page {P}.</$>
Example 1 of a custom text with incorrect style tags - TWO START TAGS, NO END TAG:
For further details, please refer to Section {N}, "<$>{T}<$>", page {P}.
Example 2 of a custom text with incorrect style tags - NESTED STYLE TAGS, START OF TAG 2 FOUND BEFORE END OF TAG 1:
For further details, please refer to <$>Section {N}, "<$>{T}</$>", page {P}</$>.



Show only the number if target numbering also includes text

how can I change a cross-reference to show only the number if target numbering also includes text, like "article 1" or "attachment 4" or section 2.01?
If you want to eliminate the text part in a cross-reference to a paragraph number that consists of both text and number, like "Article 1" or "Attachment 4" or Section 2.01, you can eliminate the text part of the field result by adding the \t switch to the inserted cross-reference field. To do so:
1. Insert a cross-reference to the desired number (includes the entire paragraph number, incl. the text part). Then follow METHOD 1 or METHOD 2 below:
METHOD 1 - use the "Field" dialog box
2. Right-click the field and select "Edit Field".
3. In the "Field" dialog box, turn ON the check box "Suppress all non-delimiter chars". Clck OK.
This adds the \t switch to the field code.
METHOD 2 - add the \t switch manually
2. Click in or select the inserted REF field, press Shift+F9 to toggle field codes of that field.
3. Add the following before the end field bracket:

\t 

4. Press F9 to update fields in the selection.
Press Shift+F9 again if the field has not automatically changed to show the field result instead of field code.
How the \t switch works
The \t switch causes a REF field to suppress non-delimiter or non-numerical text when used in conjunction with the \n, \r, or \w switch. The field results of the three examples will be as follows:
"Article 1" is displayed as "1" only.
"Attachment 4" is displayed as "4" only.
"Section 2.01" is displayed as "2.01" only.



How can I prevent a cross-reference field from inheriting highlight color from the target

If a cross-reference field refers to a highlighted target, the cross-reference field may inherit the highlight from the target.
However, this does not happen if the field code of the cross-reference field includes the \* CHARFORMAT switch and if the start of the field code is NOT highlighted.
To get rid of the highlight:
1. Toggle field codes.
2. Add \* CHARFORMAT at the end of the field code.
NOTE: Make sure to include a space after the CHARFORMAT switch and before the end of field bracket. Word may show "Error! Unknown switch argument." if the space is missing.
3. Make sure to remove any highlight from the start of the field code.
4. Update the field.
Example of field code with the \* CHARFORMAT switch:

{ REF _Ref47097374 \h \* CHARFORMAT } 


How can I apply a specific highlight color to a cross-reference field so that the highlight sticks when updating fields

Highlight can't be set as a property of a style. Therefore, you can't create a character style that applies highlight.
To add highlight to a cross-reference field (or another field) that doesn't disappear when fields are updated:
1. Add \* CHARFORMAT at the end of the field code.
NOTE: Make sure to include a space after the CHARFORMAT switch and before the end of field bracket. Word may show "Error! Unknown switch argument." if the space is missing.
2. Highlight the start of or the entire field code with the highlight color you want.
3. Update the field.
Example of field code with the \* CHARFORMAT switch - at least the R in REF must be highlighted:

{ REF _Ref47097374 \h \* CHARFORMAT } 


Why does one or more slash characters, /, sometimes appear

why does one or more slash characters, /, sometimes appear in front of the text of a cross-reference item in the "insert cross-reference" dialog box?
If a floating picture or shape, i.e. a picture or graphic that is NOT wrapped in line with text, is anchored to a cross-reference item, the graphic appears as a slash, /, in front of the text in the "Insert Cross-reference" dialog box.
The same occurs in the built-in "Cross-reference" dialog box.
Examples of targets item in the "Insert Cross-reference" dialog box:
1.2.4 /This is a heading
A target item with the number 1.2.4, the text "This is a heading", and one anchored shapes/pictures.
3.2 ///This is a heading
A target item with the number 3.2, the text "This is a heading", and three anchored shapes/pictures.
//This is a heading
A target item with the text "This is a heading", and two anchored shapes/pictures.
Note that DocTools CrossReferenceManager will handle the slashes so that the correct cross-reference is inserted.



Why am I seeing numbered items that I cannot see in the document

Why does the list of items in the "insert cross-reference" dialog box sometimes include numbered items that I cannot see in the document?
If one or more numbered items in a document have been forced to show another number using "Set Numbering Value" > "Continue from previous list" > "Advance value (skip numbers)", the "Insert Cross-reference" dialog box will include the skipped numbers in the list.
If you turn on formatting marks in the document, you can see the numbers there too. However, the skipped numbers are not shown in your document unless your document is set to show hidden text. See the explanation below:
When you use "Set Numbering Value" > "Continue from previous list" > "Advance value (skip numbers)" to skip one or more numbers, Word handles this by adding a paragraph for each of the skipped numbers.
The paragraphs have no text except the number and the paragraph mark, and the paragraphs are formatted as hidden text which means that hidden text must be shown for you to see the skipped numbers.
This means that Word manages to show the correct numbers by invisibly adding the skipped numbers. This principle applies to both simple lists (e.g. 1., 2., 3., etc.) and multilevel lists (e.g. 1., 1.1, 1.2, 1.1.1).
EXAMPLE:
You want a list with the numbers:

1. My first item 
2. Next item
5. Next item
6. Next item

If you make the jump from 2 to 5 using "Set Numbering Value" > "Continue from previous list" > "Advance value (skip numbers)", Word adds two numbered paragraphs with the skipped numbers, i.e. 3. and 4.
If you turn on formatting marks, the list will look as follows:

1. My first item¶ 
2. Next item¶
3. ¶
4. ¶
5. Next item¶
6. Next item¶

In the "Insert Cross-reference" dialog box, you will see the list as follows:

1. My first item 
2. Next item
3
4
5. Next item
6. Next item

The skipped numbers are shown in the list the "Insert Cross-reference" dialog box to make it possible to insert correct cross-reference numbers for later items in the list. You can simply ignore the "skipped numbers" in the list of items.



© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext