1

I have a cross-reference field in my Word document

{ REF bookmark_A \h }

I want to display my custom text, say Default Bookmark A Title, instead of bold Error! Reference source not found when bookmark_A will be improperly broken in future.

Is there a way to do this?

1
  • That's Word's internal error system. You'll have to dig deep to change it.
    – dnbrv
    Apr 15, 2012 at 5:17

1 Answer 1

1

Yes! Simply wrap the field in an IF field like this:

{ IF { REF bookmark_A \h} = "Error! Reference source not found" "My custom error message" "{ REF bookmark_A \h} }
3
  • Thank you for the answer. Unfortunately it doesn't work :( I tried { IF { REF bookmark_A \h} = "Error! Reference source not found" "My custom error message" "Bookmark Present" }, and it prints just REF regardless bookmark present or not.
    – Serge S.
    Jul 5, 2012 at 14:07
  • It seems that condition { REF bookmark_A \h} = "Error! Reference source not found" is not valid. (I use Word 2003)
    – Serge S.
    Jul 5, 2012 at 14:10
  • @Sergant, it works for me on Microsoft Word 2007 (sorry I don't have 2003 to test with). Two things: the error message needs to end in a full stop. The older version of MS Word might require speech marks around the REF field in the conditional (the first part). Lastly I have prepared a template that works on my side, have a look at it and see how it goes: docs.google.com/open?id=0B4h-y94oB7DOM2lLYy0wSVVsTDA
    – Adam
    Jul 6, 2012 at 2:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .