If then

D

David Bateman

I have a data sourse which includes titles (Dr.). If I print envelopes and
that title is blank then I get a space where the title should be which
statement can I use to prevent this? TIA
Dave
 
P

Peter Jamieson

If you have, e.g.

{ MERGEFIELD Title } { MERGEFIELD Lastname }

then you need something like

{ IF "{ MERGEFIELD Title }" = "" "" "{ MERGEFIELD Title } " }{ MERGEFIELD
Lastname }

If the Title evaluates to a space character within Word you may need
something more like

{ IF "{ MERGEFIELD Title }" = "" ""
"{ IF "{ MERGEFIELD Title }" = " " ""
"{ MERGEFIELD Title } " }"
"{ MERGEFIELD Title } " }{ MERGEFIELD Lastname }

If you are using ADDRESSBLOCK and are getting spaces where the title should
be, you will need to change so that you use individual fields, as above.
 
G

Graham Mayor

David said:
I have a data sourse which includes titles (Dr.). If I print
envelopes and that title is blank then I get a space where the title
should be which statement can I use to prevent this? TIA
Dave

Use a conditional field to insert the title and its following space eg

{IF {Mergefield Title} <> "" "{Mergefield Title}<put a space here>"}{Put the
next field here without a leading space}

Make sure that the fieldname above matches that in your data.

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

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 

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