Link to home
Start Free TrialLog in
Avatar of Matt Miller
Matt MillerFlag for United States of America

asked on

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.  
Avatar of jmoss111
jmoss111
Flag of United States of America image

Why not save the report as HTML and use as the email body?

.CreateMHTMLBody "file://J:/MyFolder/MyBody.htm
Avatar of Matt Miller

ASKER

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

ASKER CERTIFIED SOLUTION
Avatar of jmoss111
jmoss111
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial