Regards
I am using the below VBA code for the exporting of my report to outlook from access 2007 report, but the problem is the second page is not displaying how this can be handled the code is:
Private Sub Command86_Click()
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, "compliance", acFormatRTF, "compliance.rtf"
DoCmd.OutputTo acOutputReport, "compliance", acFormatHTML, "compliance.htm"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("compliance.htm", ForReading)
'Set f = fs.OpenTextFile("Report1.rtf", ForReading)
RTFBody = f.ReadAll
f.Close
Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
.To = "Ehmke66@email.com"
.CC = "Ehmke66@email.com"
.Subject = "Dispute Update"
.HTMLBody = RTFBody
End With
MyItem.Display
End Sub
I am using the below VBA code for the exporting of my report to outlook from access 2007 report, but the problem is the second page is not displaying how this can be handled the code is:
Private Sub Command86_Click()
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, "compliance", acFormatRTF, "compliance.rtf"
DoCmd.OutputTo acOutputReport, "compliance", acFormatHTML, "compliance.htm"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("compliance.htm", ForReading)
'Set f = fs.OpenTextFile("Report1.rtf", ForReading)
RTFBody = f.ReadAll
f.Close
Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
.To = "Ehmke66@email.com"
.CC = "Ehmke66@email.com"
.Subject = "Dispute Update"
.HTMLBody = RTFBody
End With
MyItem.Display
End Sub