Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
bsharp bsharp is offline
external usenet poster
 
Posts: 17
Default Mail merge for married contacts with different last names

I am in Word 2007 and trying to create a letter from my Outlook contacts.
Nearly all my clients are either married, or have a partner, but I only
create one contact record in Outlook for them (having two contact records
isn't an option for me). Sometimes they have different last names, which
creates problems when writing letters.

I am using BCM, and I have created two user-defined fields. One for
spouse/partner first name, the other for spouse/partner last name.

I am using if then statements in the mail merge, and am coming very close to
making this work. I can get the salutation to work no problem, it only brings
in the 2nd name if there is one there, and adds an " and " between them.

Where I am having trouble is in creating the envelope. For example, if my
clients are Bob Smith and Sarah Jones, I want the envelope to read, "Bob
Smith and Karen Jones."

Here is what I have come up with below. It came very close once, but I've
got something in the wrong spot somewhere, and as I try to "fix" it I'm
making it worse. I know some of the quotes are out of place somewhere.

{if {mergefield "spousepartner_last_name"}="" {mergefield
"first_name"}{if{mergefield "spousepartner_first_name"}="" {mergefield
"last_name"} and "{mergefield "spousepartner_first_name"}{mergefield
"spousepartner_last_name"}"}}


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail merge for married contacts with different last names

Use

{if {mergefield "spousepartner_last_name"}"" "{mergefield
"first_name"} {mergefield "last_name"} and {mergefield
"spousepartner_first_name"} {mergefield
"spousepartner_last_name"}" "{if {mergefield "spousepartner_first_name"}
"" "{mergefield "first_name"} and {mergefield "spousepartner_first_name"}""
{mergefield "Last_Name}" "{mergefield "first_name"} {mergefield
"last_name"}"}}

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"bsharp" wrote in message
...
I am in Word 2007 and trying to create a letter from my Outlook contacts.
Nearly all my clients are either married, or have a partner, but I only
create one contact record in Outlook for them (having two contact records
isn't an option for me). Sometimes they have different last names, which
creates problems when writing letters.

I am using BCM, and I have created two user-defined fields. One for
spouse/partner first name, the other for spouse/partner last name.

I am using if then statements in the mail merge, and am coming very close
to
making this work. I can get the salutation to work no problem, it only
brings
in the 2nd name if there is one there, and adds an " and " between them.

Where I am having trouble is in creating the envelope. For example, if my
clients are Bob Smith and Sarah Jones, I want the envelope to read, "Bob
Smith and Karen Jones."

Here is what I have come up with below. It came very close once, but I've
got something in the wrong spot somewhere, and as I try to "fix" it I'm
making it worse. I know some of the quotes are out of place somewhere.

{if {mergefield "spousepartner_last_name"}="" {mergefield
"first_name"}{if{mergefield "spousepartner_first_name"}="" {mergefield
"last_name"} and "{mergefield "spousepartner_first_name"}{mergefield
"spousepartner_last_name"}"}}




  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mail merge for married contacts with different last names

I trust Sarah Jonses will not mind being addressed as Karen Jones?

{ Mergefield First_Name } { IF{ Mergefield Spousepartner_last_name } = ""
"{ IF { Mergefield spousepartner_first_name } "" "and { Mergefield
spousepartner_first_name } { Mergefield Last_Name }" "{ Mergefield
Last_Name }" }" "{ Mergefield Last_Name } and { Mergefield
spousepartner_first_name } { Mergefield Spousepartner_last_name }" }

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



bsharp wrote:
I am in Word 2007 and trying to create a letter from my Outlook
contacts. Nearly all my clients are either married, or have a
partner, but I only create one contact record in Outlook for them
(having two contact records isn't an option for me). Sometimes they
have different last names, which creates problems when writing
letters.

I am using BCM, and I have created two user-defined fields. One for
spouse/partner first name, the other for spouse/partner last name.

I am using if then statements in the mail merge, and am coming very
close to making this work. I can get the salutation to work no
problem, it only brings in the 2nd name if there is one there, and
adds an " and " between them.

Where I am having trouble is in creating the envelope. For example,
if my clients are Bob Smith and Sarah Jones, I want the envelope to
read, "Bob Smith and Karen Jones."

Here is what I have come up with below. It came very close once, but
I've got something in the wrong spot somewhere, and as I try to "fix"
it I'm making it worse. I know some of the quotes are out of place
somewhere.

{if {mergefield "spousepartner_last_name"}="" {mergefield
"first_name"}{if{mergefield "spousepartner_first_name"}="" {mergefield
"last_name"} and "{mergefield "spousepartner_first_name"}{mergefield
"spousepartner_last_name"}"}}



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
bsharp bsharp is offline
external usenet poster
 
Posts: 17
Default Mail merge for married contacts with different last names

Thanks!

"Doug Robbins - Word MVP" wrote:

Use

{if {mergefield "spousepartner_last_name"}"" "{mergefield
"first_name"} {mergefield "last_name"} and {mergefield
"spousepartner_first_name"} {mergefield
"spousepartner_last_name"}" "{if {mergefield "spousepartner_first_name"}
"" "{mergefield "first_name"} and {mergefield "spousepartner_first_name"}""
{mergefield "Last_Name}" "{mergefield "first_name"} {mergefield
"last_name"}"}}

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"bsharp" wrote in message
...
I am in Word 2007 and trying to create a letter from my Outlook contacts.
Nearly all my clients are either married, or have a partner, but I only
create one contact record in Outlook for them (having two contact records
isn't an option for me). Sometimes they have different last names, which
creates problems when writing letters.

I am using BCM, and I have created two user-defined fields. One for
spouse/partner first name, the other for spouse/partner last name.

I am using if then statements in the mail merge, and am coming very close
to
making this work. I can get the salutation to work no problem, it only
brings
in the 2nd name if there is one there, and adds an " and " between them.

Where I am having trouble is in creating the envelope. For example, if my
clients are Bob Smith and Sarah Jones, I want the envelope to read, "Bob
Smith and Karen Jones."

Here is what I have come up with below. It came very close once, but I've
got something in the wrong spot somewhere, and as I try to "fix" it I'm
making it worse. I know some of the quotes are out of place somewhere.

{if {mergefield "spousepartner_last_name"}="" {mergefield
"first_name"}{if{mergefield "spousepartner_first_name"}="" {mergefield
"last_name"} and "{mergefield "spousepartner_first_name"}{mergefield
"spousepartner_last_name"}"}}





  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
bsharp bsharp is offline
external usenet poster
 
Posts: 17
Default Mail merge for married contacts with different last names

Thanks!

"Graham Mayor" wrote:

I trust Sarah Jonses will not mind being addressed as Karen Jones?

{ Mergefield First_Name } { IF{ Mergefield Spousepartner_last_name } = ""
"{ IF { Mergefield spousepartner_first_name } "" "and { Mergefield
spousepartner_first_name } { Mergefield Last_Name }" "{ Mergefield
Last_Name }" }" "{ Mergefield Last_Name } and { Mergefield
spousepartner_first_name } { Mergefield Spousepartner_last_name }" }

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



bsharp wrote:
I am in Word 2007 and trying to create a letter from my Outlook
contacts. Nearly all my clients are either married, or have a
partner, but I only create one contact record in Outlook for them
(having two contact records isn't an option for me). Sometimes they
have different last names, which creates problems when writing
letters.

I am using BCM, and I have created two user-defined fields. One for
spouse/partner first name, the other for spouse/partner last name.

I am using if then statements in the mail merge, and am coming very
close to making this work. I can get the salutation to work no
problem, it only brings in the 2nd name if there is one there, and
adds an " and " between them.

Where I am having trouble is in creating the envelope. For example,
if my clients are Bob Smith and Sarah Jones, I want the envelope to
read, "Bob Smith and Karen Jones."

Here is what I have come up with below. It came very close once, but
I've got something in the wrong spot somewhere, and as I try to "fix"
it I'm making it worse. I know some of the quotes are out of place
somewhere.

{if {mergefield "spousepartner_last_name"}="" {mergefield
"first_name"}{if{mergefield "spousepartner_first_name"}="" {mergefield
"last_name"} and "{mergefield "spousepartner_first_name"}{mergefield
"spousepartner_last_name"}"}}




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Mail Merge E-mail uses contacts that were Deleted? Brant Mailmerge 4 August 19th 08 10:42 AM
Mail Merge Using Contacts from Mail - Blank Lines ALJ1 Mailmerge 1 May 16th 08 03:36 PM
Mail merge & contacts lhotch Mailmerge 2 November 18th 05 06:15 PM
Mail merge from selected OL Contacts Bob S Mailmerge 2 November 18th 05 05:44 AM
in mail merge how do i add contacts from outlook contacts Javer Rathod Mailmerge 1 August 23rd 05 09:04 PM


All times are GMT +1. The time now is 11:46 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"