Matt Miller
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.
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
.CreateMHTMLBody "file://J:/MyFolder/MyBody