Word 2007 Mail merge - omit blank lines & address block

P

Piers Alington

I seem to be going round in circles with advice on how to solve a mail merge
problem in Word 2007

I want to omit blank lines from the name and address section of a mail merge
document.

Some advice says 'use the address block'. However, the address block does
not have the person's job title field in it - even though I have set it to be
included in the Optional Information section of the 'Match Fields' section
(what exactly is the point of that section if it doesn't do what it is
supposed to?)

So then, the advice is to use separate fields, rather than the integrated
Address Block. Fine, except that then it shows blank lines where the data
source does not have fields populated for address line 2, etc - a common
issue and one of the most obvious requirements for a mail merge function. I
cannot find out / work out how to use the 'If... Then... Else' function in
the Rules section of the Mail Merge ribbon; if you select the field 'address
line 2' as the field in the 'If Then Else' dialog box with either 'is blank'
or 'is not blank', then what do you do?

I have spent all morning on this - when it should be so simple. EXTREMELY
frustrating. Why is it SO complex to do such a SIMPLE thing?
 
G

Graham Mayor

You will need to use the individual fields and the simplest method to
suppress blank lines is to conditionally insert the fields that may be blank
and the line breaks that accompany them.

Typing directly in to the document, use CTRL+F9 for the brackets {} and
substitue the names of your fields. Press the enter key where you see ¶ and
nowhere else. Note the quotes "" (plain quotes "" rather than smart quotes
"")

{Mergefield Field1}{IF {Mergefield FieldThatMayBeEmpty1} <> "" "¶
{Mergefield FieldThatMayBeEmpty1}"}{IF {Mergefield FieldThatMayBeEmpty2} <>
"" "¶
{Mergefield FieldThatMayBeEmpty2}"}{IF {Mergefield FieldThatMayBeEmpty3} <>
"" "¶
{Mergefield FieldThatMayBeEmpty3}"}¶
{Mergefield FieldThat'sNot Empty}

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Piers Alington

Hi Graham

Thanks for your quick help on this. I have used CTRL + F9 to insert the
curly brackets as you suggested - this creates a pair of brackets each time.
How do you then create the unbalanced brackets as show in this line...

{Mergefield Field1}{IF {Mergefield FieldThatMayBeEmpty1} <> "" "¶

.... where you have 2 left hand { { and one right hand } prior to the <>

Should one of these be simply typed in?

I am not at all clear. Your help woudl be most welcome

Piers
 
P

Piers Alington

OK - I have seen how the 'spare' bracket appears at the end

I am retyping the stuff now.

I am really grateful for your help, but this is a tortuous solution for a
common, everyday requirement... Surely Microsoft can do better than this

Piers
 
P

Piers Alington

Graham

I did what you described here, but it still leaves blank lines in the
letters where there is no data in the address columns of the Excel source file

I can't copy & paste the text directly, because all the text inside the the
field codes does not show up

I will re-type what I have done to see if you can spot the error...

{MERGEFIELD MrMrs} {MERGEFIELD First_Name} {MERGEFIELD Last_Name}{IF
{MERGEFIELD Position} <> "" "
{MERGEFIELD Position}"}{IF {MERGEFIELD Company} <> "" "
{MERGEFIELD Company}"}{IF {MERGEFIELD Address_Line_1} <> "" "
{MERGEFIELD Address_Line_1}"}{IF {MERGEFIELD Address_Line_2} <> "" "
{MERGEFIELD Address_Line_2}"}{IF {MERGEFIELD City} <> "" "
{MERGEFIELD City}"}
{MERGEFIELD Post_Code}
 
G

Graham Mayor

If you save that block as an autotext entry, it will save all that effort
next time you need to create a merge document from this data source.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top