A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

VBA code to execute for a subsequent mail merge



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 1st 06, 07:02 PM posted to microsoft.public.outlook.general,microsoft.public.outlook.program_vba
Colonel Blip
external usenet poster
 
Posts: 3
Default VBA code to execute for a subsequent mail merge

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". 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:


Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run VBA code on receipt of e-mail White Horse Outlook and VBA 2 August 28th 06 09:51 PM
How to recover VBA code? Vaughan Outlook and VBA 1 August 23rd 06 12:45 PM
Sample Code for Merge With Attachments? LongWayFromHome Outlook and VBA 13 August 18th 06 06:04 PM
transfer of zip code to word with mail merge doesn't work Ken Outlook - Using Contacts 1 April 25th 06 09:48 PM
Run VBA Code from 'new mail message' on standard toolbar Carmi Outlook and VBA 8 March 31st 06 06:53 PM


All times are GMT +1. The time now is 08:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.