How To Send And Email w/ Attachment with Access

L

lil lam

Hi,

I recently learned how to create a module that sends an email to
inform users that the db is finished running.

I wanted to know, if it is possible to send this email with an
attachment.
If so, how?

Please help!!

Function email()

Dim objOut As Object
Dim objTask As Object
Dim blnCrt As Boolean

Dim iLimit As Long
Dim db As Database
Dim EmailAddy As Recordset
Dim tDate As Date
Dim CLEDMATCH As String

Set db = CurrentDb()
Set EmailAddy = db.OpenRecordset("tbl_EmailAddresses", dbOpenTable)


tDate = Format(Date, "mm/dd/yyyy")



'''OUTLOOK

On Error Resume Next
Set objOut = GetObject(, "Outlook.Application")
If objOut Is Nothing Then
Set objOut = CreateObject("Outlook.Application")
blnCrt = True
If objOut Is Nothing Then
MsgBox "Unable to start Outlook."
Exit Function
 

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