?
Solved

Word Mail merge shifting fields if blank

Posted on 2010-11-08
7
Medium Priority
?
638 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

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

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Suggested Courses

777 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