Retry - VBA code to execute for a subsequent mail merge

C

Colonel Blip

Hello, All!

Since I sent this right before the holiday weekend and didn't get any
response over the weekend, I figured it would be worth resending.

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". I need, in a mail merge to be able to
separate this field into two fields if the & exists in the First_Name field.
I was hoping I could do in using Word's IF...Then... Else but I can't.

While I normally create my mailmerge using the OL Tool|Mail Merge wizard,
that is not necessary since I have my document designed and simply need the
data exported. Is there a way with a macro in OL to export Contacts in a
form that would be usable by Word's mailmerge, but as it does so to do the
following:

1. Check the OL First_Name field.
2. If there is a "&" in the field place the second name in the Spouse field
and drop the "&" and following and put the remaining name in the First_Name
field of the merge data file.
3. If there is not a "&" in the First_Name field then do not modify the
field.

I could then reconstruct the couples with the IF statement in Word, but I
would have the couples names in separate fields to be able to use them in
other conditional command I want to use.

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

Guest

I tried creating two formula fields in a Contact view to parse the first
names into separate columns, but Word doesn't recognize custom fields in a
Mail Merge.

AFAIK, you'd have to code this in Word, not Outlook, to handle processing on
existing fields. I'd repost to a Word newsgroup.
 
S

Sue Mosher [MVP-Outlook]

Word will recognize custom fields *if* you start the merge from Outlook. But I've never tried it with formula fields.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
C

Colonel Blip

Hello, Eric!
You wrote on Tue, 5 Sep 2006 09:42:02 -0700:

Per Sue's comment on the start of the mailmerge - I am initiating this from
outlook.

I'll drop the Word group a message as well and see if anything comes up
there.

Thanks,

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

ELM> I tried creating two formula fields in a Contact view to parse the
ELM> first names into separate columns, but Word doesn't recognize custom
ELM> fields in a Mail Merge.

ELM> AFAIK, you'd have to code this in Word, not Outlook, to handle
ELM> processing on existing fields. I'd repost to a Word newsgroup.
 
G

Guest

Sue is right of course - custom fields are exposed to the list of Mail Merge
fields, however formula fields are not. So my idea about parsing out the
names with a formula field won't work. You could always build a custom form
that can extract those names into custom First Person and Second Person
fields, which could then be added to the view so that it will appear in the
list of Mail Merge fields.
 

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