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!!

So far this is what I have.... and it just sends an email from your
outlook to let users know the database is done running and the reports
are done. I wanna know how can I attach the report as a csv file to
the email.

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
 
D

David W. Fenton

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

You know, I don't have the answer to your question at my fingertips,
but I could easily look it up.

But you know why I won't?

Because you stupidly posted the same question across a half dozen
newsgroups. I'll not killfile you, but you shouldn't do that ever
again. If a question is valid for more than one newsgroup, then
crosspost to all the applicable newsgroups.

But I would suggest you'd be just as well of posting either in
comp.databases.ms-access or microsoft.public.access.
 

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