In our Outlook 2003 data we have three different name
formats, the data is in the following fields.
1. John Doe: first= John, last= Doe
2. John and Mary Doe: first= John, Spouse= Mary, Last= Doe
3. John Doe and Mary Smith: first= John, last= Doe,
spouse= Mary Smith
We are trying to figure out how to construct a merge
field so letters and envelopes will print all these names
correctly ie:
John Doe, John and Mary Doe, John Doe and Mary Smith.
Graham Mayor - 17 Dec 2003 07:35 GMT
1 & 2 are easy to arrange using condtional fields, but I see no way of
handling 3 also, unless you create a new Outlook field and separate the
spouse's surname and forename in the data file.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail gmayor@mvps.org
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
> In our Outlook 2003 data we have three different name
> formats, the data is in the following fields.
[quoted text clipped - 7 lines]
> correctly ie:
> John Doe, John and Mary Doe, John Doe and Mary Smith.
Peter Jamieson - 17 Dec 2003 11:18 GMT
Thought I'd answered this one...
As long as the Spouse names follow a certain pattern, e.g.
a. In your case (2) there is only ever one name in spouse, e.g. never "Anne
Marie"
b. In your case (3) there is always more than one name
c. the characters in the names are in alphabets that have
lowercase/uppercase versions of the letters
you can try the following:
{ MERGEFIELD first } { IF "{ MERGEFIELD spouse }" = ""
"{ MERGEFIELD last }"
"{ IF { QUOTE { MERGEFIELD spouse \*lower } \*firstcap } = { QUOTE {
MERGEFIELD spouse \*lower } \*caps }
"and { MERGEFIELD spouse } { MERGEFIELD last }"
"{ MERGEFIELD last } and { MERGEFIELD spouse }" }" }
If the names are also always capitalised the same way, i.e. all lowercase
except all initial caps, you can simplify that to
{ MERGEFIELD first } { IF "{ MERGEFIELD spouse }" = ""
"{ MERGEFIELD last }"
"{ IF { QUOTE { MERGEFIELD spouse \*lower } \*firstcap } = { MERGEFIELD
spouse }
"and { MERGEFIELD spouse } { MERGEFIELD last }"
"{ MERGEFIELD last } and { MERGEFIELD spouse }" }" }
--
Peter Jamieson - Word MVP
> In our Outlook 2003 data we have three different name
> formats, the data is in the following fields.
[quoted text clipped - 7 lines]
> correctly ie:
> John Doe, John and Mary Doe, John Doe and Mary Smith.