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?
0
gabo
11/13/2009 9:15:32 PM
word.newusers 801 articles. 0 followers. Follow

4 Replies
2574 Views

Similar Articles

[PageSpeed] 19

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" <gabo22003@yahoo.com> wrote in message 
news:3d07e4d8-e736-4226-9f9d-6f7b32b8a31a@o13g2000vbl.googlegroups.com...
> 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?
> 

0
Suzanne
11/13/2009 9:27:38 PM
On Nov 13, 4:27=A0pm, "Suzanne S. Barnhill" <sbarnh...@mvps.org> 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" <gabo22...@yahoo.com> wrote in message
>
> news:3d07e4d8-e736-4226-9f9d-6f7b32b8a31a@o13g2000vbl.googlegroups.com...
>
>
>
> > 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
0
gabo
11/13/2009 9:57:59 PM
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" <gabo22003@yahoo.com> wrote in message 
news:3d07e4d8-e736-4226-9f9d-6f7b32b8a31a@o13g2000vbl.googlegroups.com...
> 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? 

0
Doug
11/13/2009 10:20:37 PM
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" <gabo22003@yahoo.com> wrote in message 
news:621945b5-b6b0-4de7-9301-05ea8bd191a9@m20g2000vbp.googlegroups.com...
On Nov 13, 4:27 pm, "Suzanne S. Barnhill" <sbarnh...@mvps.org> 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" <gabo22...@yahoo.com> wrote in message
>
> news:3d07e4d8-e736-4226-9f9d-6f7b32b8a31a@o13g2000vbl.googlegroups.com...
>
>
>
> > 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

0
Suzanne
11/13/2009 11:25:39 PM
Reply:

Similar Artilces:

If Then Else??
Cat Indic Apple Banana Coconut Durian Ripe (R) 10 30 50 70 Unripe (U) 60 40 20 10 Seeded (SD) 70 0 0 80 Seedless(SL) 0 70 70 0 If I have a 1 column for either Fruits (Apple, Banana, Coconut or Durian)and another on Indicators (R, U, SD, SL), at the row that I have maybe listing Apple & Unripe, I want to extract the quantity (60), how do I go about with the If Then Else function? Hi, Am Mon, 19 Mar 2012 07:11:36 GMT schrieb khoo nora: > Cat Indic Apple Banana Coconut Durian > Ripe (R) 10 30 50 70 > Unripe (U) 60 40 20 10 > Seeded (SD) 70 0 0 80 > Seedless(SL) 0 70 70 0 ...

How do I freeze lines on a form
I have a form that was created in word that co-workers have to type on with client information. How do I make the lines & boxes freeze so that when they do type on it it doesn't move? Insert a table. Put each form field in a separate cell of the table. In the Table Properties dialog, Rows tab, set the row heights to "Exactly" values. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. rauten46 wrote: > I have a form that was created i...

Forwarding Calendar Object in 2007 adds recurrances when saved
Outlook 2007 on Vista Business SP1. When I forward a calendar object (open the object and select forward from the ribbon) I can send it w/o a problem. When I click save and close there is suddenly a weekly occurance of the appt. I have to open the Appt. and remove the re-occurance. Any idea how to stop this? TIA, Matt Is this a new Dell machine? If yes, then remove the Outlookaddinsetup from Control Panel->Add/Remove programs. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. How to ask a question: http://support.microsoft.com/KB/5...

Cannot add records to subform
I have a form with a subform (linked by drag and drop). The main form has a "Add New Record" button. When I add a new record via the button, I can enter info in the main form, but not in the subform. How can I fix this? Thanks. Since the button is on the main form, the new record goes to the record source of the main form. To go to a new record on the subform, either move the 'Add New Record' button to the subform, or programmatically (VBA) change the add new record reference to work on the subform instead of the main form. "tc2004" wrote: ...

Export list from Excel into Word to make labels
I have to make some name tags in Word. The list of names is in Excel. Is it possible to export the list from excel to word into labels for printing? The names are in their own cells and look like this in Excel: "Bob Smith Table 9" I would like them to show up like this in Word: Bob Smith Table 9 So I need a carriage return after the name, and then the combined text put into a label so that I can print them and then cut them into tags. Is this possible? Thanks RK Use the Mail Merge Wizard in Word to create the labels: In Step 1, choose to create Mailing Labels In Step 2,...

PO lines dont add up on printed po
Has anyone run across this anomoly? We have two lines on a po. the items are the same at each line, but at different quantity's. The extended amount is correct and the po total shows correctly, but when you print the po, the po total is the second line only, it does not include the amount in the first line. example. Line 1 is $10, Line 2 is $50. On the PO Entry window the PO total is $60. When you print it the PO Total is $50. Both lines have a status of released. We had a similar issue after upgrading to v8. Try unchecking the "Print One Purchase Order per Address" on...

HOw to Add Custom Color
Hello All! I have some queries related to MFC PropertySheet and page. Please somebody provide me useful pointer or help towards this #1 I want to know how to add custom Skin or Color to Dialog Box Title Bar #2 How to get ID of BACK,NEXT and FINISH button in MFC Based Wizard (my custom) because I want to change default look of these button or rather say I want to add color to these button. Thanks >#1 I want to know how to add custom Skin >or Color to Dialog Box Title Bar Playing with Non-client area! well there are some sample at http://www.codeproject.com , I thin...

Mailbox Manager
We have Exchange 2003 SP1 on Server 2003 SP1. Mailbox manager is working, but I find that there is still some older mail that is left in the sent items folder. I think I read that there was a patch for this in exchange 2000, though I could be mistaken. Got any ideas of what is going on? I have MM set to delete items from the inbox and sent items after 90 days. I can see some stuff older than that in many users folders. I'm not sure if Exchange has lost track of these items or if it somehow thinks they are newer than they are. Thanks for the help. Read this. http://support.microsoft...

Exchange 2003 Enterprise mail store 4 times the size of mail box t
Howdy, I've been looking at the size of my backups and my edb files, and I noticed that they've hit the 80 Gig mark. So I did a little snooping in ESM and notice the the sum total of all my users mail boxes is a little over 20 gigs. However the size of my mail store is 80gigs+. There has got to be something wrong here, but I don't see any glaring problems in the event logs. I expect that the store should be a little larger for redundancy, I'd even understand a mail store that was double. But 4 times the size seems really bad. Any ideas on what I should be checking,...

Add @domain to safe-senders list
Hi Is it possible and how to add a company domain name like @domain.com to the Outlook junk-mail safe-senders list for ALL users in our domain? We're using Exchange 2007, clients have Outlook 2007/2003. Thanks. Miha Yes, that is possible. You can either configure it at Exchange level (since you are using Exchange 2007) or you can use a group policy to distribute a default Blocked and Safe Senders list to be used by Outlook. See http://www.howto-outlook.com/howto/policies.htm -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.co...

HTML Add-in/Newsletter embedding in outlook
Outlook 2007 (on ExchangeServer) question. We have a SharePoint 2007 site where we update all the news related to 3 different departments within the company. We want to create a email message in Outlook 2007 that imitates the look and feel of the SharePoint 2007 site (some html + JavaScript) and send it to all the employees every week. Creating a email message on a outlook “form” will not be a feasible solutions as it’ll takes a long time and the SharePoint site is updated with new news items weekly (at least 10 new news items). I've played around and found out there a way ...

Combine tow Mailes
Dear All can I combine tow deferent Exchane mailes in one window to be able to brows them directly without need to alter between deferent profiles Thanks for your cooperate a.h Sorry for its replicated "ahmad" wrote: > Dear All > can I combine tow deferent Exchane mailes in one window to be able to brows > them directly without need to alter between deferent profiles > > Thanks for your cooperate > a.h OK In mailbox 2 you have to add in the permissions tab Mailbox 1 and set up as Owner. Open Mailbox 1 And go to email accounts, choose Change, More confi...

Hiding Rows if the linked rows are blank
Here is the problem: I have one worksheet (we'll call it "Segment Data") containing more rows than are normally necessary, to accomodate projects that happen to have more segments that are average. For most projects, many of the rows will not be needed and will, consequently, be left blank. A second worksheet (we'll call it "Sales Summary") will be designed with as many rows as "Segment Data" and will be auto-populated with data from the corresponding rows in "Segment Data." Therefore, if any rows in "Segment Data" are unused an...

background color in paragraphs of e-mails?
I used to be able to change the font and background colors in my e-mail replies, so that it was easier to see the latest addition to the exchange. Recently, my background color icon disappeared from my toolbar, and I have no idea why. I would like to get it back. If using or replying to Plain Text messages, there are no formatting options. Leave it that way - the sender has reasons for using Plain Text. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account ...

Add a blank row
I have a worksheet (that starts at c17) and I need to add a blank row, 3 rows up from the bottom row (last row is total, then blank, then line the new blank row is to go above this line) I would like to use a macro to do this but each month the bottom row is in a different position. Can anybody tell me how I can do this with thanks Bob Hi Robert I have a macro cobbled togaether from this group, which seems to do exactly what you want. (Take note that it serches for the word "totals" in this case. It will insert rows (you choose) 2 rows above the totals row, and also all formula...

Making words in a list a value!!
I am trying to create a list that will generate a value in another column once that word or phrase is chosen. Is this possible and how. Exp. In the drop down list I would chose Product, then in the price column the price automatically appears. brco1, Much better than I could ever explain the process. Here's exactly wha you need. http://www.contextures.com/xlFunctions02.html HT -- Case ----------------------------------------------------------------------- Casey's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=454 View this thread: http://www.excelforu...

Add items from an external application to RMS transaction grid
Is there a way to add items from an external application to MS RMS transaction grid? I want to add items using windows application or web application to RMS transaction grid. Kindly help how to add from an external application. Thanks for help in advance. You would need an Add-in for RMS to make this happen. If you are yourself not sure how to make this happen, I would consult with your RMS partner, or any of the other partners on this forum, including my company, that specialize in creating customization for RMS. If you are interested in getting an estimate for this work please f...

can't view pictures in email. Outlook 2007
I cannot view pictures in my email. All I can see is the outline of a square where there should be a picture. -- lr And there is no Infobar telling you about any blocked pictures? Try emptying your Outlook Temp Folder when Outlook is closed and then try again. See http://www.howto-outlook.com/faq/securetemp.htm -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://www.msoutlook.info/ Real World Questions, Real World Answers ----- "Navy Paoc" &l...

Publisher 2007 Trial -- can not open previous version
I downloaded the trial version of Publisher 2007. It converted all my files to 2007. I have Publisher 2000 installed on my computer. Now that the trial version has expired I can not open my files. HELP! Can we assume that you will not be purchasing the upgrade? How many files are you talking about? -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "Help a Teacher" <Help a Teacher@discussions.microsoft.com> wrote in message news:CD517A34-5D92-41CF-8529-188C9579FB39@microsoft.com... >I downloaded t...

How do I add additional lines to the work sheet.
Just a beginner here. I want to make the page longer with more lines and to include all formulas. Thanks When posting it is nice to include a lot of detail to save time and effort. Do you mean longer than 10 rows or 65000? -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com "dday504716@aol.com" <dday504716@aol.com@discussions.microsoft.com> wrote in message news:83FFEBA0-570D-431C-A099-742DEE8D6E70@microsoft.com... > Just a beginner here. I want to make the page longer with more lines and > to > include all formulas. > Thanks ...

Opened mail in Outlook
A user complained that when she came back from vacation, several, random emails were appearing as read when she herself had no access during this time. No one else has access to her account. Is there anything else that could cause this? virus, Exchange modifications, updates? Rules? Autopreview marking items as read before she gets to them? -- Kathleen Orland - MVP Outlook Outlook Tips: http://www.outlook-tips.net/ http://www.howto-outlook.com/ "pampibartels@gmail.com" wrote: > A user complained that when she came back from vacation, several, > random emails were ...

Need multiple blanks between words
I have two words, say, "ALPHA BETA", that are in a merged column(s) and are text fields and are oriented downward, such that they read as follows: A L P H A B E T A The problem is that there is no obvious space between "ALPHA" and "BETA"; in other words, for some reason, Excel 2003 ignores all spaces/ blanks. I tried many things, including inserting more than one space between the words, carriage returns, and even using the HTML "&nbsp;" entity, but nothing works. Any help would be appreciated. On Tue, 3 Nov 2009 01:52:29 -0800 (PST), skaizun &l...

Outlook 2010 mail deleting
My inbox is being automatically deleted weekly. I have changed the auto archive setting but no luck. Any sugestions would be appreciated. sean;143208 Wrote: > My inbox is being automatically deleted weekly. I have changed the auto > archive setting but no luck. Any sugestions would be appreciated. What type of email account do you use? Do you sync with a handheld device? -- Slipstick 'Outlook & Exchange Solutions Center' (http://www.slipstick.com) 'Outlook Tips' (http://www.outlook-tips.net/) -- http://forums.slipstick.com Hi Sean, ...

Mail received as raw HTML code
Hi. I have a problem with an automated mailing. I send a HTML email to various users using an asp page, to make the mailing I use ASPEmail. The problem is that one of the users, who has Microsoft Outlook Express installed, receive the mail as raw HTML code, however he is able to receive correctly other mails in HTML format. I=B4ve tried to fix this problem adding some META definitions to the mail=B4s code, I=B4ve used so far the following two: <META http-equiv=3DContent-Type content=3D"text/html;" charset=3D"iso-8859-1"> <META content=3D"MSHTML 6.00.2900.2...

Word 2007 paragraph spacing
In WORD 2007 (and maybe earlier versions) 'paragraph spacing' measurements sometimes use 'line' as the unit of spacing and sometimes use 'pt'. Can I force it to always use 'pt'? It uses pt (or any of the other units that Word knows) when you specify an Exactly value; it uses lines when you don't, and it calculates the amount of line spacing (1, 1.5, etc.) on the basis of the point size of the type in the paragraph. On Jan 15, 3:57=A0pm, Scribble <Scrib...@discussions.microsoft.com> wrote: > In WORD 2007 (and maybe earlier versions) &...