Empty TOC without error message ?

G

Guenter T.

Hi,

I am authoring a template for my workgroup for design documents.
All documents shall have the same structure, which includes an index
of tables and an index of pictures in the document.
While I want to have this index in every document, it is perfectly ok
for any single document not to have any pictures in it (it will have
at least one table, the revision history).
Now when I insert the {toc} entry for the pictures and do not have any
picture, I get a nasty "Error! no picture entries found" line in my
document. For this is not an error, but by design, I'd like to have
some text there like "(no pictures in this document)", so I'd like to
customize this error message.

Any ideas how to achieve that in terms of a document template are
greatly appreciated!

Guenter from Frankfurt/Germany
 
C

Cindy M -WordMVP-

Hi Guenter,

Basically, what you need to do is put the TOC into an IF field. Roughly
like this:
{ IF "{ TOC }" = "Error! Etc." "" "{TOC}" }

The quotes are very important. And the Error text must be *exactly* what
Word displays. If you want to display a message, rather than nothing,
then put the text you want between the "" (the "true" result).
I am authoring a template for my workgroup for design documents.
All documents shall have the same structure, which includes an index
of tables and an index of pictures in the document.
While I want to have this index in every document, it is perfectly ok
for any single document not to have any pictures in it (it will have
at least one table, the revision history).
Now when I insert the {toc} entry for the pictures and do not have any
picture, I get a nasty "Error! no picture entries found" line in my
document. For this is not an error, but by design, I'd like to have
some text there like "(no pictures in this document)", so I'd like to
customize this error message.

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top