SO, trying to send a report that I have in the actual body of the email. So far I have gotten the below code to generate an email but its all text and none of the formatting on the report. The report has a repeating "certificate" look to it, with 2 text boxes, a rectangle border and 2 linked pictures. Here is the code I am using, whaaaaaat did I do wrong?
Code:
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Dim RTFBody, strTo
Dim MyApp As New Outlook.Application
Dim MyItem As Outlook.MailItem
DoCmd.OutputTo acOutputReport, "rpt_ReportName", acFormatRTF, "rpt_ReportName.Rtf"
'DoCmd.OutputTo acOutputQuery, "Query1", acFormatHTML, "Query1.htm"
Set fs = CreateObject("Scripting.FileSystemObject")
'Set f = fs.OpenTextFile("Query1.htm", ForReading)
Set f = fs.OpenTextFile("rpt_ReportName.rtf", ForReading)
RTFBody = f.ReadAll
f.Close
Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
.To = "Email@SomeEmail.com"
.Subject = "Email Subject"
'.Body = RTFBody
.HTMLBody = RTFBody
End With
MyItem.Display