I have a custom caption in a Word document, but I guess the same question could be asked about tables, or figures.
Is there a field code I can use to find the total number of captions of this type, or the largest caption number (which is the same thing), so that I can have a sentence that says "This document contains 21 tables" or similar...
Field code for total number of <caption>
-
- Administrator
- Posts: 12603
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
-
- Administrator
- Posts: 78437
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Field code for total number of <caption>
See Dynamic word, table, and figure counts in MS Word (unfortunately, it's not https, but the site is OK).
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12603
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Field code for total number of <caption>
That makes sense, I'll give it a try. Thank you.
(my browser add-ons automatically redirected me to the https site)
(my browser add-ons automatically redirected me to the https site)
StuartR
-
- Administrator
- Posts: 12603
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Field code for total number of <caption>
I tried following this guidance, and it required hidden fields in every single caption, which seems very risky to me - it would be easy to miss one, or to add an extra one.
My caption is called "Recommendation" and I ended up simply adding
{ SET fr { SEQ Recommendation \* ARABIC \c } }
to the end of my document and then using
{ REF fr }
in each place where I needed to put the total number of recommendations. It seems to be working correctly.
My caption is called "Recommendation" and I ended up simply adding
{ SET fr { SEQ Recommendation \* ARABIC \c } }
to the end of my document and then using
{ REF fr }
in each place where I needed to put the total number of recommendations. It seems to be working correctly.
StuartR
-
- 5StarLounger
- Posts: 612
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Field code for total number of <caption>
Remember that you can save a complex field construction like this as AutoText or some other Building Block.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- Administrator
- Posts: 12603
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe