Add the following function to a standard module:
Code:
Function vcSendEmail_Outlook_With_Attachment(sSubject As String, sTo As String, Optional sCC As String, Optional sBcc As String, Optional sAttachment As String, Optional sBody As String)
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
OutMail.To = sTo
If sCC <> "" Then OutMail.CC = sCC
If sBcc <> "" Then OutMail.BCC = sBcc
OutMail.Subject = sSubject
If sBody <> "" Then OutMail.HTMLBody = sBody
' Debug.Print sAttachment
' Stop
OutMail.Attachments.Add (sAttachment)
OutMail.Display 'Send | Display
' OutMail.Inspector.Activate
Set OutMail = Nothing
Set OutApp = Nothing
End Function
Now you can call it from your db using the appropriate arguments.
Cheers,