Using Outlook Redemption to Send Report from Access

I am currently using Outlook Redemption to send out a report from Access.  I am trying to figure out a way to send the report in the body of the e-mail rather than a line by line read which I currently do.  Help would be creatly appreciated.  
LVL 1
mattfmillerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jmoss111Connect With a Mentor Commented:
I gave you the code for SMTP.

All that you have to do with Outlook is add .Body = "c:\EODReport.html"
under the With olMsgtr before the .Send
0
 
jmoss111Commented:
Why not save the report as HTML and use as the email body?

.CreateMHTMLBody "file://J:/MyFolder/MyBody.htm
0
 
mattfmillerAuthor Commented:
where would I put it?
Private Sub Command34_Click()
 
Dim sline As String
Dim ebody As String
Dim db As Database
Set db = CurrentDb
DoCmd.OutputTo acOutputReport, "End of Day E-mail", acFormatHTML, "c:\EODReport.html"
  
  Set olApptr = Outlook.Application
  Set olMsgtr = olApptr.CreateItem(olMailItem)
  Set sfMsgtr = CreateObject("Redemption.SafeMailItem")
  Set sfMsgtr.Item = olMsgtr
  sfMsgtr.Subject = "Daily Production " & [Forms]![Automated Processes]![End Date]
   
  With olMsgtr
  .To = "My e-mail address"
    End With
  sfMsgtr.Send
 
  Set olApptr = Nothing
  Set olMsgtr = Nothing
  Set sfMsgtr = Nothing
  Set sfRcpttr = Nothing
  Kill "c:\EODReport.html"
 
 
 
 
 
End Sub

Open in new window

0
All Courses

From novice to tech pro — start learning today.