Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Word Mail merge shifting fields if blank

Posted on 2010-11-08
7
Medium Priority
?
642 Views
Last Modified: 2012-05-10
Aloha I am using mail merge for the first time pretty successfully at thi spoint but I know there is alot more that can be done. Is there a way if a value is returned in a column that you can shift the bottom rows up. for example.

I dont want this
Ted Turner
123 main st.

Atlanta GA, 01921

I want this
Ted Turner
123 main st.
Atlanta GA, 01921

0
Comment
Question by:Wonderwall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Expert Comment

by:honestman31
ID: 34088602
in the mail merge Recipients  sort by names then just uncheck the empty names
0
 
LVL 10

Expert Comment

by:honestman31
ID: 34088606
see this attachment
ZA001110953.gif
0
 

Author Comment

by:Wonderwall
ID: 34089004
Ok, based on the example you have above I would have a Street address 2 which would have apt # lets say. In most cases this would be blank if it is then I need the city, state and zip to move up. I am wondering how do I chcek for a specific value and if it is blank or is equal to a value I don't want to print can I shift the rows printed up?

 
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 50
ID: 34089049
Hello,

you can edit the field codes in Word to skip empty fields.

Hit Alt-F9 to see all Field codes. It will look something like

{ MERGEFIELD  "name" }
{ MERGEFIELD   "address1" }
{ MERGEFIELD   "address2" }
{ MERGEFIELD  "city" }

If you want to change the settings to skip the "address2" field if it is empty, follow these steps:

Highlight the line with "address2", then hit Ctrl-F9. This will encase the merge field into a new field, putting brackets before and after it. Then edit this to look like:

{ MERGEFIELD  "name" }
{ MERGEFIELD   "address1" }
{ IF { MERGEFIELD   "address2" } <> "" "{MERGEFIELD "address2" }
" ""}{ MERGEFIELD  "city" }

You can simply type the IF next to the new bracket, then add the <> signs. To insert the second Mergefield, hit Ctrl-F9 again after the <> "" " 
Then manually type MERGEFIELD "address2" into the new set of brackets. Note that the paragraph mark sits inside a pair of double quotes.

The syntax for the IF statement in Word Field codes is { IF <condition> "this is printed on true" "this happens on false" }

Note that the false action is just an empty string and no paragraph mark after that. Then the "city" field will follow directly after the address1.

cheers, teylyn
0
 

Author Comment

by:Wonderwall
ID: 34089080
Ok great one more thing if I wanted to not print a column value if it hit a specific value, let's say in the case "Apt 2" then I am assuming I can use this? Mahalo

 MERGEFIELD  "name" }
{ MERGEFIELD   "address1" }
{ IF { MERGEFIELD   "address2" } <> "Apt 2" "{MERGEFIELD "address2" }
" ""}{ MERGEFIELD  "city" }

0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 34089115
Right. If the mergefield is not = Apt 2, it will be printed, followed by a paragraph mark. Otherwise, nothing will be printed and the city field follows next.
0
 

Author Closing Comment

by:Wonderwall
ID: 34089173
thx dude
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As freelancing is becoming more and more common in the tech industry, certain obstacles are proving to be a challenge to those who are used to more traditional, structured employment. This article is meant to help identify such obstacles and offer a…
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question