
Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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
> 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
[quoted text clipped - 33 lines]
> >
> > Thank you for any help you can give me!
Graham Mayor - 02 Oct 2004 12:38 GMT
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.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham,
> Thank you for your response and suggestionsplus the mailmerge macro
[quoted text clipped - 78 lines]
>>>
>>> Thank you for any help you can give me!