Looping Module to EMail Attachment Based on Path

  • Thread starter DoctorV3774 via AccessMonster.com
  • Start date
D

DoctorV3774 via AccessMonster.com

I have a table in Access named Tbl_Persons. This table has 4 fields
Code
EMail_Address
Person
Path

When I click a button I want the module to do the following.
Send an E-Mail to each email address with an attachment based on the path and
place in the subject the Field Person Value plus the words Report

Example Records in Tbl_Person
I have 1 for code, (e-mail address removed) for EMail_Address, John Doe as Person, C:\
MyWordReport.doc as Path

I need the code to email to (e-mail address removed) the attachment C:\MyWordReport.doc
and in the subject say John Doe Report

THEN go the next record and do the same until all the records are complete.

How can i do this? Thanks
 
D

David Lloyd

The following KB article give many of the specifics to do this using
Outlook. If you enclose the code given there in a recordset loop, you can
iterate through all of your records. Of course, this assumes you have
Outlook installed on the computer.

http://support.microsoft.com/default.aspx?scid=kb;en-us;209948

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


message
I have a table in Access named Tbl_Persons. This table has 4 fields
Code
EMail_Address
Person
Path

When I click a button I want the module to do the following.
Send an E-Mail to each email address with an attachment based on the path
and
place in the subject the Field Person Value plus the words Report

Example Records in Tbl_Person
I have 1 for code, (e-mail address removed) for EMail_Address, John Doe as Person, C:\
MyWordReport.doc as Path

I need the code to email to (e-mail address removed) the attachment C:\MyWordReport.doc
and in the subject say John Doe Report

THEN go the next record and do the same until all the records are complete.

How can i do this? Thanks
 
G

Guest

I do this very thing, I use "Send Object". I am emailing a report as RTF
(rich Text Format, which opens in Word) to each person on my list. I have
created a looping routine that sends the email for each person.

Look at the various settings for TO, CC, BCC, Subject, Body
Hint: Use the macro sto set it up initially, then save as a module - then
copy it to your module that contains your loop.

It works pretty well. If you need more information, just ask.

SteveD
 

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