Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How To Send And Email w/ Attachment with Access

1 view
Skip to first unread message

lil lam

unread,
Sep 8, 2010, 4:19:06 PM9/8/10
to
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

lil lam

unread,
Sep 8, 2010, 4:19:09 PM9/8/10
to

Arvin Meyer

unread,
Sep 11, 2010, 3:11:23 PM9/11/10
to
If you are using Outlook, the code is here:

http://www.datastrat.com/Code/OutlookEmail.txt
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access Solutions", published by Wiley


"lil lam" <hli...@gmail.com> wrote in message
news:22b419d5-8766-491c...@s17g2000prh.googlegroups.com...

0 new messages