Error! No table of contents entries found.

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

Can someone offer some assistance, when placing a Field Code TOC\c
"Figure" if no Figures exist that a string be substituted in the place
of the index of figures? Maybe some sort of if statement if TOC is
empty then put the word NONE.

Table of Contents
Page
1 Set Up and Configure the Module.......2
2 File Settings ........................6
2.1 CUSTOM SECTION .......................7

Table of Figures
None

Thank you in advance.
 
Hi Bruce,
Can someone offer some assistance, when placing a Field Code TOC\c
"Figure" if no Figures exist that a string be substituted in the place
of the index of figures? Maybe some sort of if statement if TOC is
empty then put the word NONE.
You need an IF field for this; and the IF field will need to test the
*EXACT* error message. So

1. Insert the TOC field and make sure there are no entries for it, so
that you get the error message.

2. Select the field (the error message) - make sure it's exactly the
field result, no more and no less

3. Copy

4. Move to just before the TOC field, press Alt+F9 so that you see the
field codes

5. Type in a pair of quotes "", a space. Then the text you want to see
if there's an error message (within quotes). Then put quotes around the
TOC field. Position the cursor between the first pair of quotes.

5. Edit/Paste Special and choose "plain text" (you want only the error
message, not the field that generated it)

6. Select the whole "line" (quoted text plus TOC field with quotes)

7. Press Ctrl+F9 to put all this in field brackets

8. Copy the TOC field

9. Just to the right of the opening field bracket you inserted, Type: IF

10. Then type a space and an opening quote. Paste the TOC field, and put
a closing quote after it

11. Type: [space]=[space]

The result should be something like this:

{ IF "{TOC}" = "Error message" "NONE" "{TOC}" }

Now Alt+F9, then Ctrl+A, F9 and see if it works...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Back
Top