Hide merge fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I hide a mail merge field if it meets a certain condition (can I use
the IF statement, if so how?)? For instance if STATE="California" then I
want the mail merge field (i.e. <<State Abbreviation>>) to show, if not, I do
not want it visible.
 
That is what the IF field is for.

{ IF {MergeField "State" } = "California" "CA" }

Didn't see the sense of including another mergefield if the only state is
California, if you need the mergefield, insert that instead.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
I guess I should not have used <<State Abbrev>> as an example.

If the state is California, I would want to show the division number,
otherwise show nothing. Would I then use:
{ IF {MergeField "State" } = "California" <<Division_No>> }?

THANK YOU!!!
 
I would use:
{ IF {MergeField "State" } = "California" {MergeField Division_No} }
I definitely like to make my MergeField and Ref field references explicit.
It makes debugging a lot easier. Remember that the braces must be inserted
by Word, not just typed. I sometimes put quotation marks around my
mergefields in IF fields and calculation fields. That may just be
superstitious behavior on my part, though.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
I *always* put quotes around the field results in IF constructions and
calculations - even where they are not strictly required - because it makes
the statements easier to debug.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top