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 2005

Tip: Looking for answers? Try searching our database.

Using 2+ different e-mail lists?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Trey - 02 Aug 2005 00:51 GMT
Hi again,

Tangentially related to my previous inquiry "Very Challenging Project" -- I
was trying to execute an e-mail merge in Word using data from an Access
table. The e-mail addresses I want to send to are located in the table
itself. There are a few different e-mail columns/fields in the tables (e.g:
one column is Manager E-mail. another is Planner E-mail). It's easy enough to
get the Word filter to point to one of the fields and mail to those
addresses...but what if I want to send e-mails to _all_ addresses in the
entire table? Will I have to run one merge for each field?  Or is there a
workaround so I can merge and e-mail to everyone in one shot?

Thanks again!

-Trey
Doug Robbins - 02 Aug 2005 04:47 GMT
You will need to resort to VBA to send to multiple email addresses.  Some of
the code you will need is in the article
"Mail Merge to E-mail with Attachments" at

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

and I based that on the second method in the article

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

http://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

> Hi again,
>
[quoted text clipped - 14 lines]
>
> -Trey
Peter Jamieson - 02 Aug 2005 09:20 GMT
> Will I have to run one merge for each field?

Yes, unless you follow the suggestions Doug has made or are
a. either able to design a query that returns one record for each distinct
e-mail address in each record and which can also be used as the data source
for a merge (and be aware that if you need to use a UNION query to do this,
the query may not be listed when you try to connect to it from Word
b. or able to modify the structure of your database to take account of this
requirement.

An example of the sort of UNION query (let's call it myquery) that could do
(a):

SELECT ID, manager_email AS 'email' FROM mytable WHERE manager_email IS NOT
NULL
UNION
SELECT ID, planner_email AS 'email' FROM mytable WHERE planner_email IS NOT
NULL

where ID consists of the primary key field(s) of mytable. (I may have got
some of the details wrong in here, e.g. used the wrong sort of quotes around
'email' etc).

To use this as part of a data source, you would need another query such as

Select  * FROM myquery, mytable WHERE myquery.ID = mytable.ID

(or use an INNER JOIN if you prefer)

But as I say, you might not be able to connect to this query, at least using
the default connection method (OLEDB).

Peter Jamieson

> Hi again,
>
[quoted text clipped - 14 lines]
>
> -Trey

Rate this thread:






 
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.