Send Mail From Access

  • Thread starter Thread starter PaleRider
  • Start date Start date
P

PaleRider

Hi,

Is there a way to send the results of a report to multiple email recipients
from Access 2003. I already have a table with email addresses and I have
looked at some examples in this forum, but I don't know how to use the code
examples and make it work for my situation. Can someone help me with how to
code things to send email to Outlook.

I have a report "Personnel" that gets data from a query "qryPersonnel". I
then have a email table with the following fields:

(tblMyMail)
Email_ID = PK
Email_Address = Text
Email_Subject = Text
Date_Sent = DATE/TIME

I have the following Report with these fields:

(rptPersonnel)
Full_Name
Company_Name
Contact_Name
Void_Date
DaysLeft

If you require more information let me know. Thank you in advance.

PR
 
PaleRider said:
Hi,

Is there a way to send the results of a report to multiple email
recipients
from Access 2003. I already have a table with email addresses and I have
looked at some examples in this forum, but I don't know how to use the
code
examples and make it work for my situation. Can someone help me with how
to
code things to send email to Outlook.

http://www.datastrat.com/Code/MultipleEmail.txt
 
Arvin,

I actually found your code at this web address more suitable for me.

http://www.datastrat.com/DataStrat2.html

With some tweaking it works great with no error messages from Outlook. One
question though, is there a way to just send the output from the Report
without attaching anything to the email.

If not, then is it possible to change the name of the attached file to
something other than Senate.

-PR
 
PaleRider said:
Arvin,

I actually found your code at this web address more suitable for me.

http://www.datastrat.com/DataStrat2.html

With some tweaking it works great with no error messages from Outlook.
One
question though, is there a way to just send the output from the Report
without attaching anything to the email.

Please do not actually send the emails because the list is old and the
Senators are getting tired of junk mail.

Not with the code in the SendObject method. Also remember that this sends
the output as an HTML file. You may want to change it to a snapshot format
if they don't have Access, or with Access 2007, you can also use a PDF
format.
If not, then is it possible to change the name of the attached file to
something other than Senate.

Absolutely. The list box on the left lists all the reports, just choose
what's in your database (and delete the Senate report). Also remember that
by locating and changing both the query and the name of the query in your
code, it will use your data, not the existing data.
 
Back
Top