Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / May 2004

Tip: Looking for answers? Try searching our database.

suppress blank line in Mail merge Mergefield Condition

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sumesh - 13 May 2004 22:12 GMT
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
Charles Kenyon - 14 May 2004 04:10 GMT
Hi,

Take a look at:
http://homepage.swissonline.ch/cindymeister/mergfaq2.htm#SepFile
Signature


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 have a condition like this - just giving an example but
> in reality it will have more.
[quoted text clipped - 17 lines]
> Thanks
> Sumesh
Charles Kenyon - 14 May 2004 04:43 GMT
Oops... It is getting late. This is the right reply, but to the wrong
message. Sorry.

> Hi,
>
[quoted text clipped - 21 lines]
> > Thanks
> > Sumesh
Peter Jamieson - 14 May 2004 10:43 GMT
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.

Signature

Peter Jamieson

> I have a condition like this - just giving an example but
> in reality it will have more.
[quoted text clipped - 17 lines]
> Thanks
> Sumesh
Sumesh - 14 May 2004 15:09 GMT
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

>-----Original Message-----
>You can use the following approach:
[quoted text clipped - 31 lines]
>
>.
Graham Mayor - 14 May 2004 15:49 GMT
> I combined the if statement.
>
[quoted text clipped - 15 lines]
> 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.

Signature

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

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

Sumesh - 14 May 2004 16:29 GMT
Yes It did work.

Thanks a lot guys.

>-----Original Message-----
>
[quoted text clipped - 28 lines]
>of your three letter sets within the field. Thus when the condition is met
>you get the three letters AND the line feed.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.