Display text if a group of mergefields are blank

C

cjg.groups

Hello,

I have a group of mergefields which may or may not contain data when
merged. Is it possible to show alternate text if every mergefield in
the group is blank?

It seems inefficient to use an IF statement to check if each field is
blank, then access each field again to be displayed. Is there an
analog to the mergefield \f and \b switches which show text when the
field is empty? Could I place all mergefields inside a field and use
some special switch?

Thanks in advance!
 
C

Cindy M.

I have a group of mergefields which may or may not contain data when
merged. Is it possible to show alternate text if every mergefield in
the group is blank?

It seems inefficient to use an IF statement to check if each field is
blank, then access each field again to be displayed. Is there an
analog to the mergefield \f and \b switches which show text when the
field is empty? Could I place all mergefields inside a field and use
some special switch?
My first inclination was to say "Yes, IF field is the way to go". But
on thinking things through, there might be a more efficient way to use
it.

A SET field will let you set a bookmark with content that's not visible
in the document. So:

{ SET FieldTest "{Mergefield X}{Mergefield Y}{Mergefield Z}" }

{ IF { REF FieldTest } = "" "" "{Mergefield X}{Mergefield Y}{Mergefield
Z}" }

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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