Share via

Error! Book mark not defined

Anonymous
2018-01-17T14:35:47+00:00

I started create an index but later we decided not to have one.  To return to a plain document I decided to delete all XE codes.  When I went to print the Error! message came up all over my 400 page document.

Brainlessly again I searched for Error! Bookmark . . . and deleted all these in one foul sweep all 6,000 to them.  The rest is history.  Can I print out this document without these Error! codes?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Stefan Blom 342.4K Reputation points MVP Volunteer Moderator
    2018-01-17T21:45:39+00:00

    Searching for XE only will find that particular text, so your former XE fields are now most likely cross-reference fields instead (as I suggested in my previous reply).

    Assuming that you do not have any other REF fields in your document, you can use a macro such as the following:

    Sub RemoveREFFields()

    'Macro created by Stefan Blom, MVP, January 2018

    Dim f As Field

    Dim FieldCount As Long

    Dim i As Long

    FieldCount = ActiveDocument.Fields.Count

    For i = FieldCount To 1 Step -1

    Set f = ActiveDocument.Fields(i)

    If f.Type = wdFieldRef Then

    f.Delete

    End If

    Next i

    End Sub

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-01-17T21:17:57+00:00

    Hello Stefan,

    Thanks for your input. I first started to delete the XE and braces part by highlighting and backspace. Then I searched for XE, using the search and replace facility, and discovered that it appeared to find the complete code XE, braces and text.  At first I replaced them individually.   As this appeared to be working well I then went for replace all.  But when I went into print; this “Error! . . .” Satement appeared in place of code which had been previously taken out. I then decided to take this “Error! . . .” Statement out using the search and replace facility.  

    The problem still remains.

    Thankyou for your interest and help.

    D.

    Was this answer helpful?

    0 comments No comments
  3. Stefan Blom 342.4K Reputation points MVP Volunteer Moderator
    2018-01-17T20:28:37+00:00

    How did you delete the XE fields? Typically you would display hidden text and then you can search for ^d XE and replace with nothing. (I'm assuming that these special characters can be used in Word for Mac as well.)

    Of course, you will also have to delete the INDEX field if there is one in the document.

    However, since you are seeing an error that refers to bookmarks, perhaps you deleted the "XE" part and left the argument in the document? For example, deleting "XE" in { XE test } would leave { test } which Word treats as a REF (cross-reference to bookmark) field. Display field codes (Alt+F9 on a PC) and see what you have. I don't know of an easy way to delete REF/bookmark fields without resorting to a macro. (If the "REF" part was available, deleting could be done with find and replace.)

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2018-01-17T19:25:17+00:00

    Hello James,

    Many thanks for coming back so quickly.

    My problem is that when I try to print document, the document changes by generating these "Error! Bookmark not defined." codes through throughout the complete document, approx. 6,000 in total.

    It was my fault for not deleting the original index codes correctly and to make matters worse I tried to delete the present code "Error! Bookmark not defined."

    not realising that this code would reappear when I go to print.

    I'm using Ms Word for Mac 20011 v. 14.7.2 (170228) latest update 14.7.2

    My machine is Macbook Air OC X Yosemite.

    Thank you for your help it is really appreciated.

    Sincerely,

    Daniel

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2018-01-17T17:49:31+00:00

    Hi WDKMcK,

    Please make sure you followed the steps in the Step 2: Edit or delete index entries (optional) to delete the index entries.

    If the issue remains, can you provide the following information?

    1. Which version of Office are you using? (Click Word > About Word)
    2. A full screenshot of the Error! message.

    Regards,

    James

    Was this answer helpful?

    0 comments No comments