Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
gabo gabo is offline
external usenet poster
 
Posts: 2
Default IF/THEN/ELSE adds a blank line in mail merge WORD 2007

Hello,

I need to merge some mailings based on if the first name is not the
same as nickname, print nickname else don't print anything and go to
the next field. The code I have is:

{IF {MERGEFIELD fName} {MERGEFIELD nName} {MERGEFIELD nName} ""}


What is happening is if the first name and nickname are the same a
blank line appears. How do I supress the blank line?
  #2   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default IF/THEN/ELSE adds a blank line in mail merge WORD 2007

Make the line break part of your TrueText (note that you don't have to
include FalseText if it's "nothing"). So you'll have:

{I F { MERGEFIELD fName } { MERGEFIELD nName } "{ MERGEFIELD nName }
" }

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"gabo" wrote in message
...
Hello,

I need to merge some mailings based on if the first name is not the
same as nickname, print nickname else don't print anything and go to
the next field. The code I have is:

{IF {MERGEFIELD fName} {MERGEFIELD nName} {MERGEFIELD nName} ""}


What is happening is if the first name and nickname are the same a
blank line appears. How do I supress the blank line?


  #3   Report Post  
Posted to microsoft.public.word.newusers
gabo gabo is offline
external usenet poster
 
Posts: 2
Default IF/THEN/ELSE adds a blank line in mail merge WORD 2007

On Nov 13, 4:27*pm, "Suzanne S. Barnhill" wrote:
Make the line break part of your TrueText (note that you don't have to
include FalseText if it's "nothing"). So you'll have:

{I F { MERGEFIELD fName } { MERGEFIELD nName } "{ MERGEFIELD nName }
" }

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USAhttp://word.mvps.org

"gabo" wrote in message

...



Hello,


I need to merge some mailings based on if the first name is not the
same as nickname, print nickname else don't print anything and go to
the next field. The code I have is:


{IF {MERGEFIELD fName} {MERGEFIELD nName} {MERGEFIELD nName} ""}


What is happening is if the first name and nickname are the same a
blank line appears. How do I supress the blank line?- Hide quoted text -


- Show quoted text -


Thank you,

I have for the code:

{ IF{ MERGEFIELD fName } {MERGEFIELD nName } "{MERGEFIELD nName }
"}

and this stil shows a blank line. for the quotes I've used double/
single and it is still inserting a blank line
  #4   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default IF/THEN/ELSE adds a blank line in mail merge WORD 2007

If you want the firstname on one line and the nickname if it is not the same
as the firstname on the next line, use the following field construction

{ MERGEFIELD fName }{ IF { MERGEFIELD fName } = { MERGEFIELD nName } "" "¶
{ MERGEFIELD nName }" }

Where you press the Enter key (or Shift+Enter) where the ¶ appears.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"gabo" wrote in message
...
Hello,

I need to merge some mailings based on if the first name is not the
same as nickname, print nickname else don't print anything and go to
the next field. The code I have is:

{IF {MERGEFIELD fName} {MERGEFIELD nName} {MERGEFIELD nName} ""}


What is happening is if the first name and nickname are the same a
blank line appears. How do I supress the blank line?


  #5   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default IF/THEN/ELSE adds a blank line in mail merge WORD 2007

Did you remove the line break you had *after* the mergefield? Note that the
mergefield for your next line should immediately follow this one:

{ IF{ MERGEFIELD fName } {MERGEFIELD nName } "{MERGEFIELD nName }
"}{ MERGEFIELD whatever }

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"gabo" wrote in message
...
On Nov 13, 4:27 pm, "Suzanne S. Barnhill" wrote:
Make the line break part of your TrueText (note that you don't have to
include FalseText if it's "nothing"). So you'll have:

{I F { MERGEFIELD fName } { MERGEFIELD nName } "{ MERGEFIELD nName }
" }

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USAhttp://word.mvps.org

"gabo" wrote in message

...



Hello,


I need to merge some mailings based on if the first name is not the
same as nickname, print nickname else don't print anything and go to
the next field. The code I have is:


{IF {MERGEFIELD fName} {MERGEFIELD nName} {MERGEFIELD nName} ""}


What is happening is if the first name and nickname are the same a
blank line appears. How do I supress the blank line?- Hide quoted text -


- Show quoted text -


Thank you,

I have for the code:

{ IF{ MERGEFIELD fName } {MERGEFIELD nName } "{MERGEFIELD nName }
"}

and this stil shows a blank line. for the quotes I've used double/
single and it is still inserting a blank line

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2007, How do I suppress blank line results in a mail merge? ckrumana Mailmerge 2 January 30th 09 11:16 PM
using word 2007 suppress blank line when merge field is empty Shelly Mailmerge 1 June 16th 08 08:18 PM
Deleting a blank line in mail merge anjw38 Mailmerge 6 January 10th 08 07:24 PM
REMOVE BLANK LINE IN MAIL MERGE Nancie Mailmerge 1 December 9th 07 07:18 AM
Is it possible to retain a blank line in mail merge? Roy Laws Mailmerge 1 October 6th 05 04:38 AM


All times are GMT +1. The time now is 08:28 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"