mail merge for envelope to pick from home or business address - ho

P

PZ Straube

Hello,
Nearly all my contacts in Outlook 2003 have one one type of address: home or
business. I would like to set up an envelope template that based on whether
the address is home or is business will print out the appropriate business or
home address fields. Additionally, I need to get a bar code to print for the
ZIP code again based on the teyp of address.
What I can't figure out is how to:
(A) Have it check for a Company name ONCE then if there is no company name,
use all the fields from the home address in one fell swoop - OR _ if there is
a company name, use only business addresses.
and
(B) Have a ZIP code bar code print out dependent on which address was
selected for printing.

I thought I could just hit Function F9 and that would help - but it didn't.

Thank you for any help you can give me!
 
G

Graham Mayor

Use the postal address field and Word will pick the address you have defined
in Outlook as the postal address - see http://www.gmayor.com/Macrobutton.htm
and http://www.gmayor.com/mailmerge_from_outlook.htm Unfortunately this
won't help with the barcode, so the alternative would be to use a series of
conditional fields to test for the Company field content eg

{IF {Mergefield Company} <> "" "{Mergefield BusinessAdd1}
" "{Mergefield HomeAdd1}
"}{IF {Mergefield Company} <> "" "{Mergefield BusinessAdd2}
" "{Mergefield HomeAdd2}
"}{IF {Mergefield Company} <> "" "{Mergefield BusinessAdd3}
" "{Mergefield HomeAdd3}
"} etc

You can merge alternative bar codes using the same method.
Substitute the fieldnames that you wish to use. Note each pair of field
brackets is place with CTRL+F9.

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


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

PZ Straube

Graham,
Thank you for your response and suggestionsplus the mailmerge macro links.
A problem I'm having is how to put multiple fields inside one part of an IF
statement. In other words, using an IF statement, if the company name were
not blank, in the first part of THEN, I would want the entire Business
address laid out in its normal fashion with the street one one line followed
by the city, state, and zip on the next. However, after I put in the street,
Word reads the next field, city, and assumes it is the ELSE part of the IF
statement. I thought if I hit F9 for each of the two parts of the IF
statement then put the different fields inside, that would work. But it
ddn't. I seem to recall reading that there is a way to do that but naturally
I can't find it anywhere.

Here's what I'd like to have (minus the brackets - -plus, ignore the THEN
and ELSE since it is just for your purposes):


Title FirstName LastName
Company
IF Company = "" THEN

HomeStreet
HomeCIty, HomeState HomeZIP
HomeZIPBarCode

Else

BusinessStreet
HomeCIty, BusinessState BusinessZIP
BusinessZIPBarCode

Thanks again for your time in responding to my question
 
G

Graham Mayor

OK. You can lay it out more or less as you have written it (though I suggest
reversing the statements as *sometimes* Word has trouble with testing for
null entries). Line feeds can be inserted in the field construction. Just
make sure that you define the If and ELSE sections with speech marks and the
fields themselves are brackets with field boundaries (CTRL+F9). You will
have to insert the fields manually. The following should do the trick.

{Mergefield Title} {Mergefield FirstName} {Mergefield LastName}
{IF {Mergefield Company} <> "" "{Mergefield Company}
{Mergefield BusinessStreet}
{Mergefield HomeCIty}, {Mergefield BusinessState} {Mergefield BusinessZIP}
{Mergefield BusinessZIPBarCode}" "{Mergefield HomeStreet}
{Mergefield HomeCIty}, {Mergefield HomeState} {Mergefield HomeZIP}
{Mergefield HomeZIPBarCode}"}

To clarify, in the following example I have shown the paragraph marks and
the spaces

{Mergefield Title}<space>{Mergefield FirstName}<space>{Mergefield LastName}¶
{IF {Mergefield Company}<space><><space>""<space>"{Mergefield Company}¶
{Mergefield BusinessStreet}¶
{Mergefield HomeCIty},<space>{Mergefield BusinessState}<space>{Mergefield
BusinessZIP}¶
{Mergefield BusinessZIPBarCode}"<space>"{Mergefield HomeStreet}¶
{Mergefield HomeCIty},<space>{Mergefield HomeState}<space>{Mergefield
HomeZIP}¶
{Mergefield HomeZIPBarCode}"}¶

Unfortunately you cannot simply cut and paste from here. The example in the
earlier message was written to take account of addresses which may have
missing lines of information. UK addresses do not fall neatly into the US
layout.

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