jasonphillipstx
Technical User
I have an rtf file created by using the docmd.output method and I want to send it as the body and not as an attachement. Is there a way to do this?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub RTFBody()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Dim RTFBody
Dim MyApp As New Outlook.Application
Dim MyItem As Outlook.MailItem
'Using the FileSystemObject to read in RTF
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\MyFile.rtf", ForReading)
RTFBody = f.readall
f.Close
'Create email
Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
.To = "Contact@hotmail.com"
.Subject = "Subject Line"
.Body = RTFBody
End With
'Show email
MyItem.Display
End Sub