Merged documents prints "(Blank)"

K

kojaks43

Using Excel data I have Address1 and Address2. Frequently Address2 is blank.
When I merge the document address2 shows as (Blank).

All that I have read leads me to believe Word 2003 automatically suppresses
blank fields, but not so much in mine.

What am I doing wrong?

Your guidance is appreciated.
 
G

Graham Mayor

The simplest approach which works for all versions is to use a conditional
field to insert the field only when it has content ie

{Mergefield Address1}{If{Mergefield Address2} <> "" "
{Mergefield Address2}


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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
K

kojaks43

This is what I did: ( inserted the data fields from my Excel file, I then
added the IF statement and this is what it looked like:

«Prefix» «First_Name» «Last_Name»
«Provider»
«Address1»
{IF (MERGEFIELD Address2 < >â€â€}«Address2»
«City», «State» «Zip»

This was the result:
Ms. Paula Funez
Baptist Echocardiography
P.O. Box 970252
{IF (MERGEFIELD Address2 < >â€â€}(blank)
Miami, FL 33197
As you can see, it not only continues to print (Blank) now it includes the
IF statement.

I think this could give me another heart attack!

What have I done wrong here?
 
G

Graham Mayor

That is not what I advocated!

If you toggle the display (ALT+F9)

you want

{Mergefield Prefix} {Mergefield First_Name} {Mergefield Last_Name}
{Mergefield Provider}
{Mergefield Address1}{IF {Mergefield Address2} <> "" "
{Mergefield Address2}"}
{Mergefield City}, {Mergefield State} {Mergefield Zip}

which would be the equivalent of

«Prefix» «First_Name» «Last_Name»
«Provider»
«Address1» {IF «Address2» <>"" "
«Address2»"}
«City», «State» «Zip»

Pairs of field brackets are each inserted with CTRL+F9
You can insert the mergefields from the toolbar or better still enter them
manually.
When you have finished, toggle the display again (ALT+F9)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
K

kojaks43

Thanks, Mr Mayor:
This was hard as it was the first time I tried the mergefield business. It
took me a few tries to understand I needed to do Ctrl F9 for each set of
braces. I did it once and then typed subsequent braces. When it dawned on
me I was getting a non-bold brace and curley quotes, I realized my error.
It works fine for me now.
Again thanks for the guidance and patience.
k
 
G

Graham Mayor

You are welcome

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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