NWildblood
Technical User
Hi, I have found an old thread that sends a report as the body of an Outlook email:
Access SendObject outlook email? thread702-1114426
Works perfectly well, unforrtunately my company in its wisdom has shifted us onto Lotus Notes
I have tried so far unsuccesfully to modify it to work with Lotus Notes - any mods or ideas ???
Original code from Remou (more or less):
_______________________________________
Option Compare Database
_______________________
Sub RTFBody()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Dim RTFBody, strTo
Dim MyApp As New Outlook.Application
Dim MyItem As Outlook.MailItem
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\Report.rtf", ForReading)
RTFBody = f.readall
f.Close
Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
.To = "me@hotmail.com"
.Subject = "txtSubjectLine"
.Body = RTFBody
End With
MyItem.Display
End Sub
______
Any assistance gratfully received !
"No-one got everything done by Friday except Robinson Crusoe...
Access SendObject outlook email? thread702-1114426
Works perfectly well, unforrtunately my company in its wisdom has shifted us onto Lotus Notes
I have tried so far unsuccesfully to modify it to work with Lotus Notes - any mods or ideas ???
Original code from Remou (more or less):
_______________________________________
Option Compare Database
_______________________
Sub RTFBody()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Dim RTFBody, strTo
Dim MyApp As New Outlook.Application
Dim MyItem As Outlook.MailItem
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\Report.rtf", ForReading)
RTFBody = f.readall
f.Close
Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
.To = "me@hotmail.com"
.Subject = "txtSubjectLine"
.Body = RTFBody
End With
MyItem.Display
End Sub
______
Any assistance gratfully received !
"No-one got everything done by Friday except Robinson Crusoe...