Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email reports using Microsoft Access 1

Status
Not open for further replies.

angela23

Technical User
Feb 15, 2003
5
US
I would like to email reports from Microsoft Access. I teach classes and would like to email students reminders of their expiration dates.

If I have their email address in a field of Microsoft Access is there a way to email them their expiration date and availability of upcoming classes

Thank you for your time.
 
there is no problem emailing from access, but as far as i know, if you want to send them a report, you gonna need to:
1. save the report as a snapshot
2. the students who receive it will need s snapshot viewer to see it (ships with ms-office)

so if raw text is good enough for you (that way it can be written in the email body itself) , use this:

Sub SendMail()
Dim olApp As Outlook.Application
Dim MailMsg As Outlook.MailItem

Set olApp = CreateObject("outlook.Application")
Set MailMsg = olApp.CreateItem(olMailItem)
MailMsg.To = (email address here as string)
MailMsg.Subject = "123 testing"
MailMsg.Body = "hello email system"
MailMsg.Attachments.Add "AnyFileName.ext"
MailMsg.Send
olApp.Quit
Set MailMsg = Nothing
Set olApp = Nothing
End Sub

hope this helps
Erez.
 
Thank you so much.

Could you please tell me where I type the information that you typed above - or direct me what topics I can look under in Microsoft Access Help.

I am getting familiar with Access - and I took a 2 day class in it -
Your idea of putting the text in the body of the email is exactly what I wanted! -

Thank you again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top