Automating captions

I am trying to automate the captions in a report template. I need the captions to start renumbering from 1 in each portion of the report. Each report will include information on a varying number of floors in the building being discussed. For the 24th floor, I want the caption to start at 24-1. For the 5th floor, I want the caption to start at 5-1. For the mezzanine level, I want the caption to start at M-1.

In trying to do this, I defined a bookmark FloorA which contains the floor number of the first floor in the report. Then I modified a caption from 24 { SEQ 24 - \* ARABIC} to { REF  FloorA } - {SEQ {REF  FloorA } \* ARABIC } . Unfortunately, this evaluates to 24- Error! Bookmark not defined. Caption

Since the first REF field evaluates as expected, the bookmark must be defined. What am I doing wrong?

The intent is to edit the contents of the FloorA bookmark and have the captions automatically update so the user doesn't have to edit the numbering of the caption fields individually.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Hello Neil,

Thank you for posting on Microsoft Community.

In order to resolve the issue you may select the Caption and then use Ctrl+Shift+F9 to convert it to ordinary text. You may now modify the Caption. Ctrl+Shift+F9 is used to unlink a field.

You may refer to Doug Robbins suggestions from the following Microsoft Answers thread which talks about resolution for the same error.

http://answers.microsoft.com/en-us/office/forum/office_2010-word/error-bookmark-not-defined/2ac3347e-8803-4be3-bb61-612bde646e70

Note: The above mentioned thread talks about this issue with respect to Table of Contents in Word 2010 documents, but you may follow the Word MVP's suggestion which should apply with respect to your issue as well.

Try the above step and let us know the result.

Thank you.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Did you use CTRL+F9 to insert each pair of field delimiters?

With a bookmark FloorA that contains the number 24, the following field constructions

Image

display

Image

Note however that if you edit the contents of the FloorA bookmark, unless you unlink the captions already created, they will ALL change to reflect the new value in the bookmark

Image

But for some reason that I have not figured out, if the bookmark contains a single digit, the same field construction returns

Image

which is a different problem for the one that you have.

However, given that using a reference to a bookmark is not really an option, you may as well just use

Image

which displays

Image

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

The information was useful, but it doesn't deal with the problem I am having. I am trying to reference a bookmark in the same document. I want to retain the links, not convert them to text.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I didn't create all the field delimiters using CTRL+F9. I started with an automatically created caption, then tried to edit it. I did the editing using CTRL+F9. Just to be sure, I went back and redid it, to no avail.

Then I started from scratch and found it worked. Rather than ending up with:

{REF FloorA}-{SEQ{REF FloorA}}, I ended up with

{REF FloorA \* MERGEFORMAT}-{SEQ{REF FloorA \* MERGEFORMAT}}

I must admit to confusion over the purpose/usage of MERGEFORMAT. I don't know what it is supposed to do, so I don't know when to use it or remove it. The help text I have found hasn't been helpful.

I did take the FloorA caption and use it throughout the pages relating to FloorA. It worked as hoped. I then copied it to the FloorB pages, changed the references to refer to the FloorB bookmark and it worked as hoped. When I copied it to FloorC, and edited the references the sequence numbers all display as 0. FloorC is a single digit floor (e.g. 6). Further, changing the bookmark to '06', '6 ' or ' 6' doesn't help. The first REF field shows '06', but the SEQ only displays 0.

Interestingly for the Ground floor with the single letter 'G' in the FloorF bookmark, the sequence numbers work properly. This is both consistent with your post and frustratingly inconsistent, and has now become a problem for me.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

To edit an existing field, use the Alt+F9 toggle (which shows/hides field codes). Update with F9.
Stefan Blom
MS 365 Word MVP since 2005
Volunteer Moderator
MS 365, Win 11 Pro
~~~
Note that I do not work for Microsoft
https://mvp.microsoft.com/
~~~
Please specify Word version & OS in your question

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I have been using the Toggle Field Codes option on the right click menu. Because of the bug in handling single digit bookmarks I fear I will have to abandon this approach and rely on manually editing the caption sequence fields.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

If you put a space after the single digit in the bookmark, the bug does not surface, or use the numbers

01

02

03

04

05

etc in the bookmarks.

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

If you test it in the user interface, in the Bookmark dialog box, bookmark names consisting of digits aren't accepted. Maybe that is the explanation (or part of it at least).
Stefan Blom
MS 365 Word MVP since 2005
Volunteer Moderator
MS 365, Win 11 Pro
~~~
Note that I do not work for Microsoft
https://mvp.microsoft.com/
~~~
Please specify Word version & OS in your question

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

The bookmark names are of the form 'FloorA'. It is the contents of the bookmark that consist of a digits.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

As noted in the edited reply, I did try prepending a 0 and appending a space, and it didn't work for me.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Question Info


Last updated April 14, 2025 Views 97 Applies to: