suppress blank line in Mail merge Mergefield Condition

S

Sumesh

I have a condition like this - just giving an example but
in reality it will have more.

{if {mergefield Empcode} ="1" "XVT"}
{if {mergefield Empdept} ="10" "AFG"}
{if {mergefield EmpSal}="3400" "DDD"}
{if {mergefield Emp22cd}="3" "DER"}
{if {mergefield Emp22cp}="2" "DDER"}

When merge take place if the first condition fails a
blank line is inserted. I would like suppress the blank
line.

I can't have a nested if statement. It will be like an
individual If statement. Is there any way to suppress
the blank line?

Appreciate your valuable answers.

Thanks
Sumesh
 
C

Charles Kenyon

Oops... It is getting late. This is the right reply, but to the wrong
message. Sorry.
 
P

Peter Jamieson

You can use the following approach:

{if {mergefield Empcode} ="1" "XVT
" "" }{if {mergefield Empdept} ="10" "AFG
" "" }{if {mergefield EmpSal}="3400" "DDD
" ""}etc.

i.e. you put the Enter (new paragraph) inside the result, but have a blank
result with no new paragraph if the result is False.In effect, all the
mergefield fields are on a single line until they are evaluated.
 
S

Sumesh

I combined the if statement.

{if {mergefield Empcode} ="1" "XVT
" "" }{if {mergefield Empdept} ="10" "AFG
" "" }{if {mergefield EmpSal}="3400" "DDD
" ""}

The result was

XVT DDD etc.

Everything comes in a single line. I want to output to be

XVT
DDD
etc.

Thanks
Sumesh
 
G

Graham Mayor

Sumesh said:
I combined the if statement.

{if {mergefield Empcode} ="1" "XVT
" "" }{if {mergefield Empdept} ="10" "AFG
" "" }{if {mergefield EmpSal}="3400" "DDD
" ""}

The result was

XVT DDD etc.

Everything comes in a single line. I want to output to be

XVT
DDD
etc.

Thanks
Sumesh

Then you are not using the following exactly

{if {mergefield Empcode} ="1" "XVT
" "" }{if {mergefield Empdept} ="10" "AFG
" "" }{if {mergefield EmpSal}="3400" "DDD
" ""}

The lines here are not broken by the e-mial but by pressing enter after each
of your three letter sets within the field. Thus when the condition is met
you get the three letters AND the line feed.


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

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

Sumesh

Yes It did work.

Thanks a lot guys.
-----Original Message-----


Then you are not using the following exactly

{if {mergefield Empcode} ="1" "XVT
" "" }{if {mergefield Empdept} ="10" "AFG
" "" }{if {mergefield EmpSal}="3400" "DDD
" ""}

The lines here are not broken by the e-mial but by pressing enter after each
of your three letter sets within the field. Thus when the condition is met
you get the three letters AND the line feed.


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