Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word Mail Merge E-mail uses contacts that were Deleted? | Mailmerge | |||
Mail Merge Using Contacts from Mail - Blank Lines | Mailmerge | |||
Mail merge & contacts | Mailmerge | |||
Mail merge from selected OL Contacts | Mailmerge | |||
in mail merge how do i add contacts from outlook contacts | Mailmerge |