Here are some things I found out last week when a client called and asked for help with table and figure captioning:
- You can ONLY use chapter/section numbering in a table/figure etc. caption IF you use Word’s Heading 1 to Heading 9 styles for your headings (and they are set for outline numbering), as these are the ONLY options available to you on the Caption Numbering window of the Caption window
- If you’ve created your own outline numbered heading style and called it MyCompany Heading 1, you cannot select that style for auto numbering the captions. (A little more info: https://social.technet.microsoft.com/Forums/office/en-US/391594c0-a20c-4676-9592-b8f825b1ce57/change-a-custom-heading-style-in-such-a-way-that-the-caption-tool-recognises-the-heading-so-the?forum=word)
- If you try to rename the in-built Heading 1 style to MyCompany Heading 1, then when you click OK, Word will change the style name to Heading 1,MyCompany Heading 1 (i.e. it will append your name to the Heading 1 style name)
- If you right click immediately before the chapter numbering field in a caption and select Toggle Field, you’ll see { STYLEREF 1 \s }, where StyleRef is the field code, ‘1’ represents the heading number (1 = Heading 1), and \s is an undocumented switch code that I think means to reset the sequence after each Heading 1 (based on some information I found here for SEQ field codes: http://www.addbalance.com/usersguide/fields.htm).
You can ONLY use chapter/section numbering in a table/figure etc. caption IF you use Word’s Heading 1 to Heading 9 styles for your headings (and they are set for outline numbering), as these are the ONLY options available to you on the Caption Numbering window of the Caption windowIf you’ve created your own outline numbered heading style and called it MyCompany Heading 1, you cannot select that style for auto numbering the captions. (A little more info: https://social.technet.microsoft.com/Forums/office/en-US/391594c0-a20c-4676-9592-b8f825b1ce57/change-a-custom-heading-style-in-such-a-way-that-the-caption-tool-recognises-the-heading-so-the?forum=word)MyCompany Heading 1https://social.technet.microsoft.com/Forums/office/en-US/391594c0-a20c-4676-9592-b8f825b1ce57/change-a-custom-heading-style-in-such-a-way-that-the-caption-tool-recognises-the-heading-so-the?forum=wordIf you try to rename the in-built Heading 1 style to MyCompany Heading 1, then when you click OK, Word will change the style name to Heading 1,MyCompany Heading 1 (i.e. it will append your name to the Heading 1 style name)MyCompany Heading 1Heading 1,MyCompany Heading 1If you right click immediately before the chapter numbering field in a caption and select Toggle Field, you’ll see { STYLEREF 1 \s }, where StyleRef is the field code, ‘1’ represents the heading number (1 = Heading 1), and \s is an undocumented switch code that I think means to reset the sequence after each Heading 1 (based on some information I found here for SEQ field codes: http://www.addbalance.com/usersguide/fields.htm).{ STYLEREF 1 \s }http://www.addbalance.com/usersguide/fields.htmSo, what can you do? Well, you have a few options…
Option 1: Use Word’s Heading 1 style
The simplest option is to use Word’s Heading 1 style for your top-level headings. Style it according to what you want (font and paragraph settings, numbering, tabs etc., even add your own name to the style name), but don’t set up your own style for heading 1s if you also want to use auto numbered captions. There are other reasons to use Word’s own heading styles too—see this article for 16 reasons why: https://shaunakelly.com/word/numbering/usebuiltinheadingstyles.html
https://shaunakelly.com/word/numbering/usebuiltinheadingstyles.htmlOption 2: Modify the StyleRef field code
Update a week later: This option may NOT work successfully. When I tried it, I’d get one or two right, then I’d do another in a new heading and the first ones wouldn’t work, or I’d get a continuous sequence number for the second part of the caption number.
Update a week later:This option may NOT work successfully. When I tried it, I’d get one or two right, then I’d do another in a new heading and the first ones wouldn’t work, or I’d get a continuous sequence number for the second part of the caption number. This option is feasible if you use your own heading 1 style and only have a few captions. If you have many, it will become very tedious and hard for others to manage if they don’t know what you did. In this method, you’ll change the ‘1’ in the field code to the name of your own heading 1 style (I’ve used MyCompany Heading 1 as the example; your style name will be different):
MyCompany Heading 1
- Right-click immediately before the chapter numbering field in a caption and select Toggle Field Codes. You should see { STYLEREF 1 \s }. If you don’t, then position your cursor immediately in front of the chapter number part of the caption number (the first number) and try again.
- Right-click in the field (anywhere inside the { } ), then select Edit Field.
- Select your own heading 1 style from the list, then click OK.
- The caption number should now reflect your custom heading 1 chapter/section number. If it says Error! No text of specified style in document. then either you don’t have any outline numbers for your custom heading 1 style or you haven’t used that style in your document.
- If you right-click on the field again, you should see { STYLEREF “MyCompany Heading 1” \s }, where MyCompany Heading 1 is the name of your custom heading 1 style.
- Repeat these steps for EVERY table/figure or other caption you have that uses chapter/section numbering as part of the caption.
Right-click immediately before the chapter numbering field in a caption and select Toggle Field Codes. You should see { STYLEREF 1 \s }. If you don’t, then position your cursor immediately in front of the chapter number part of the caption number (the first number) and try again.Toggle Field Codes{ STYLEREF 1 \s }firstRight-click in the field (anywhere inside the { } ), then select Edit Field.{ }Edit Field.Select your own heading 1 style from the list, then click OK.OKThe caption number should now reflect your custom heading 1 chapter/section number. If it says Error! No text of specified style in document. then either you don’t have any outline numbers for your custom heading 1 style or you haven’t used that style in your document.Error! No text of specified style in document.If you right-click on the field again, you should see { STYLEREF “MyCompany Heading 1” \s }, where MyCompany Heading 1 is the name of your custom heading 1 style.{ STYLEREF “MyCompany Heading 1” \s }MyCompany Heading 1 Repeat these steps for EVERY table/figure or other caption you have that uses chapter/section numbering as part of the caption.Tip: Get one right, then copy/paste it to replace other captions, then update all the fields. I haven’t tried this, but it should work. Test on a couple first, not the several hundred you have—if it works on those, then repeat for the others you have.
TipOption 3: Use an add-in
In my searching for an answer to this issue, I found a free add-in that’s available from one of the very helpful people on the Word VBA forums: http://jay-freedman.info/custom_style_captions.htm
http://jay-freedman.info/custom_style_captions.htmNotes:
- I have NOT installed or used this add-in so I can’t comment on its usefulness or not; however, the author of it is someone I trust who knows their stuff.
- The webpage for this add-in says that it works (has been tested) up to Word 2016. There’s a very good chance that it works with later versions of Word too, but as I haven’t tested it I can’t confirm that.
- I suspect that this add-in might only work on Word for Windows—I don’t have Word for Mac so I can’t test it on that.
I have NOT installed or used this add-in so I can’t comment on its usefulness or not; however, the author of it is someone I trust who knows their stuff.The webpage for this add-in says that it works (has been tested) up to Word 2016. There’s a very good chance that it works with later versions of Word too, but as I haven’t tested it I can’t confirm that.I suspect that this add-in might only work on Word for Windows—I don’t have Word for Mac so I can’t test it on that.[Links last checked March 2022]