how to add second page

syedadnan

Access Lover
Local time
Today, 10:02
Joined
Mar 27, 2013
Messages
315
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
 

Users who are viewing this thread

Back
Top Bottom