Jay - Thanks for the feedback. Please let me clarify to ensure the right next
steps. When I Right Click/Toggle Field the "Error Bookmark not defined."
error message the revealed field appears as { "Word" }. But when I turn on
the Show/Hide tool, all the fields appear as they properly should for an
index entry, i.e. {XE "Word"}. The "XE" is in there. Can I do a Find/Replace
to eliminate the current Index entries using a wildcard entry in the Find
block and nothing in the Replace block? I seem to remember something like
that but cannot remember what the Find entry should look like to eliminate
every Indexed Entry. Thanks
Since I don't know exactly how the "damaged" fields (the ones that display the
error message) are different from undamaged ones, it's hard to say what the
result of any operation will be.
The absolutely required first step -- which I should have mentioned before -- is
to make a copy of your document, and try any repairs *only* on the copy. If
something goes horribly wrong, you can throw away the copy and make a new copy
of the original.
If you want to try a Replace, here are the steps:
1. Turn on the Show/Hide (or at least go to Office button > Word Options >
Display and check the box for Hidden text) so you can see the codes of the
undamaged XE fields.
2. Press Alt+F9, which toggles all the field codes at once. Now you should see
the codes of the fields that cause the error messages also.
3. In the Replace dialog, click in the "Find what" box and enter this:
^19 XE
Be sure to include one space between the 9 and the X. Then click the Replace All
button.
If Word really sees the codes internally the way it displays them on the screen
(and the appearance of the error messages makes me doubt this), then the Replace
will remove all of the index entries from the document -- both the bad ones and
the good ones -- and you can then rerun the AutoMark operation. If the stars are
aligned against you, it will remove only the good ones.
If this try fails, use the macro I gave you before. It occurs to me that it
might be useful to check each field only to see whether its result is the error
message, since I can't tell whether Word really "thinks" it's a Ref field. The
adjustment is to change the lines
If .Type = wdFieldRef And _
InStr(.Result, "Error!") Then
to just this:
If InStr(.Result, "Error!") Then