Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2007

Tip: Looking for answers? Try searching our database.

automatic email merge using addresses from multiple fields?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JDDS - 14 Aug 2007 19:48 GMT
I have a mail merge document set up to pull info from Access into a form
letter. I'd like to automatically e-mail the letter to each of 4 addresses
included in separate columns in each record. The only obvious way I could see
to do an automatic mailing either directly from mail merge or to a .pdf only
gives the option of selecting one column of the record to send to. I created
a new column in the query concatenating all the addresses with the usual
semicolon separator, but outlook wouldn't recognize them as separate
addresses.  Any ideas?
Doug Robbins - Word MVP - 15 Aug 2007 00:22 GMT
You are going to need to use some Visual Basic code that makes use of the
Outlook Object Model.

You should be able to glean what you want from the following articles:

"Mail Merge to E-mail with Attachments" at

http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm

and

"How to send an email from Word using VBA" at:

http://www.word.mvps.org/FAQs/InterDev/SendMail.htm

Signature

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

>I have a mail merge document set up to pull info from Access into a form
> letter. I'd like to automatically e-mail the letter to each of 4 addresses
[quoted text clipped - 7 lines]
> semicolon separator, but outlook wouldn't recognize them as separate
> addresses.  Any ideas?
Peter Jamieson - 15 Aug 2007 09:14 GMT
If you have to have all the addressees on one e-mail, then you have to
automate Outlook as Doug says. There doesn't appear to be any syntax that
lets you concatenate multiple addresses in the To field during a Word Mail
merge.

As long as it's OK to send one e-mail to each address, another possibility
wmight be to create the data source you need in Access, e.g. using a UNION
query. So for example iff your address fields in Access are called
a1,a2,a3,a4 the UNION query might be something like

SELECT a1 AS a, * FROM mytable WHERE a1 <> ""
UNION
SELECT a2 AS a, * FROM mytable WHERE a2 <> ""
UNION
SELECT a3 AS a, * FROM mytable WHERE a3 <> ""
UNION
SELECT a4 AS a, * FROM mytable WHERE a4 <> ""

(You may need to use other conditions in the WHERE, e.g. WHERE a4 <> "" AND
a4 IS NOT NULL, and the syntax may need correcting)

You probably won't be able to use that query directly as a data source, but
you can either
a. save the query results as a new table
b. use that table as the data source for the merge
c. delete the table
or
d. try creating another query that does

SELECT * FROM theNameOfTheUnionQuery

and use that as the data source

Peter Jamieson
>I have a mail merge document set up to pull info from Access into a form
> letter. I'd like to automatically e-mail the letter to each of 4 addresses
[quoted text clipped - 7 lines]
> semicolon separator, but outlook wouldn't recognize them as separate
> addresses.  Any ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.