Another mailmerge question

C

Colonel Blip

Hello, All!

My outlook 2k3 contact form is the default. The contact names take the form
of Full Name made up of First Name and Last name. First name for a husband
and wife is of the form "Jack & Jill". If they have a cell phone then the
Mobile field is his and the Other field is hers. I have created a mail merge
that works great (thanks to help from Graham here in the group. For the cell
phones in the merge I have an IF...Then...Else statement that checks that
each cell phone field is not blank and puts the text "Cell:" in front of the
number. What I would like to do is have it produce "Jack:" for the Mobile
number and "Jill:" in front of the Other field's number.

In some cases the Contact is single so it doesn't require any entry in front
of the number.

Is there a way to do this in a mail merge?

Thanks.

Thanks,
Colonel Blip.
E-mail: (e-mail address removed)
 
G

Graham Mayor

No. You cannot read part of a field using an IF field.
The best you can manage with your data in this form is 'his' and 'hers'
eg
{IF {Mergefield Other_Phone} <> "" "His Cell {Mergefield Mobile_Phone}
Her Cell {Mergefield Other_Phone}" "Cell {Mergefield Mobile_Phone}"}

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Colonel Blip

Hello, Graham!
You wrote on Fri, 1 Sep 2006 09:06:25 +0300:

I suspected as much.

Thanks,

Colonel Blip.
E-mail: (e-mail address removed)

GM> No. You cannot read part of a field using an IF field.
GM> The best you can manage with your data in this form is 'his' and 'hers'
GM> eg
GM> {IF {Mergefield Other_Phone} <> "" "His Cell {Mergefield Mobile_Phone}
GM> Her Cell {Mergefield Other_Phone}" "Cell {Mergefield Mobile_Phone}"}
 
C

Colonel Blip

Hello, Graham!
You wrote on Fri, 1 Sep 2006 09:06:25 +0300:

On a related question, I googled all over the place but was never able to
find a good listing of all of the commands for coding (not macros/vba) and
examples of their use. Do you know of such a resource? Maybe I could figure
some of this stuff out rather than leeching all of the time with questions.

Thanks,

Colonel Blip.
E-mail: (e-mail address removed)

GM> No. You cannot read part of a field using an IF field.
GM> The best you can manage with your data in this form is 'his' and 'hers'
GM> eg
GM> {IF {Mergefield Other_Phone} <> "" "His Cell {Mergefield Mobile_Phone}
GM> Her Cell {Mergefield Other_Phone}" "Cell {Mergefield Mobile_Phone}"}
 
G

Graham Mayor

They are all listed and documented in vba help.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Colonel Blip

Hello, Graham!
You wrote on Fri, 1 Sep 2006 09:06:25 +0300:

Another thought. Say I follow approach outlined in your message. What about
a macro that would read the First_Name, look for the "&" and if it found it
replace the "His" with the "Jack" name and if there was an Other replace the
"Her" with the "Jill" name? Is such code instruction possible with Word's
VBA?

Thanks again,

Colonel Blip.
E-mail: (e-mail address removed)

GM> No. You cannot read part of a field using an IF field.
GM> The best you can manage with your data in this form is 'his' and 'hers'
GM> eg
GM> {IF {Mergefield Other_Phone} <> "" "His Cell {Mergefield Mobile_Phone}
GM> Her Cell {Mergefield Other_Phone}" "Cell {Mergefield Mobile_Phone}"}
 
G

Graham Mayor

You couldn't do it as part of the mail merge - you would have to run the
code on the document created from the merge, but it should be possible. It
would however make more sense to use the Spouse field in Outlook and set up
your contacts so that they can be used as intended. You can access all of
the fields including custom fields from Outlook.
http://www.gmayor.com/mailmerge_from_outlook.htm

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Colonel Blip

Hello, Graham!
You wrote on Fri, 1 Sep 2006 17:08:36 +0300:

I thought about that about 5 iterations of questions ago <g> but decided,
for lack of knowing I couldn't do simply what I want to do, that it was too
much of a hassle. I would need to change my OL form and publish it, then go
thru and, I think, delete spouses from the first name and add them to the
Spouse field. I guess I could then test thru IF to see if the spouse was
populated and if it was do a "First_Name" " &" "Spouse_Name" "Last_Name"
construct in the IF statement, correct? Of course the cell phone number
assignments would be straight-forward.

Thanks,

Colonel Blip.
E-mail: (e-mail address removed)

GM> You couldn't do it as part of the mail merge - you would have to run
GM> the code on the document created from the merge, but it should be
GM> possible. It would however make more sense to use the Spouse field in
GM> Outlook and set up your contacts so that they can be used as intended.
GM> You can access all of the fields including custom fields from Outlook.
GM> http://www.gmayor.com/mailmerge_from_outlook.htm
 
G

Graham Mayor

There are no easy solutions here - unless the Outlook guys know better ;)
But if the data source is right you can construct the conditional fields as
you want them.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Colonel Blip

Hello, Graham!
You wrote on Fri, 1 Sep 2006 19:15:05 +0300:

Maybe there is a way of writing a macro that will at least take the
First_Name field and check for the & and if it finds it put the 2nd name in
the spouse field and delete the "& ..." part of the First_Name and export
all of it to the merge file data file. I should be so lucky. <g>

Thanks,

Colonel Blip.
E-mail: (e-mail address removed)

GM> There are no easy solutions here - unless the Outlook guys know better
GM> ;) But if the data source is right you can construct the conditional
GM> fields as you want them.
 

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