I have information on a form that I want put into an email. However, I can't do the way that I usually do it because a good number of people are carrying blackberries and some of the ones with older phones can't view attachmnets. Therefore, I want to be able to bring the information directly (or indirectly) into the body of the email. My several feeble attempts have failed. This is what I have at this time. Any ideas would be appreciated.
Private Sub Command36_Click()
Dim stDocName As String
Dim EmailApp, NameSpace, EmailSend As Object
DoCmd.OutputTo acReport, "Email", acFormatTXT, "h:\email.txt"
Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.getNameSpace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
EmailSend.To = "persons name here"
EmailSend.subject = "EMERGENCY"
'EmailSend.Message = "h:\email.txt" (THIS FAILED)
'EmailSend.Attachments.Add "h:\email.txt" (THIS WORKS BUT I CAN'T USE ATTACHMENTS)
EmailSend.Display
Set EmailApp = Nothing
Set NameSpace = Nothing
Set EmailSend = Nothing
Kill "h:\email.txt"
End Sub
Private Sub Command36_Click()
Dim stDocName As String
Dim EmailApp, NameSpace, EmailSend As Object
DoCmd.OutputTo acReport, "Email", acFormatTXT, "h:\email.txt"
Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.getNameSpace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
EmailSend.To = "persons name here"
EmailSend.subject = "EMERGENCY"
'EmailSend.Message = "h:\email.txt" (THIS FAILED)
'EmailSend.Attachments.Add "h:\email.txt" (THIS WORKS BUT I CAN'T USE ATTACHMENTS)
EmailSend.Display
Set EmailApp = Nothing
Set NameSpace = Nothing
Set EmailSend = Nothing
Kill "h:\email.txt"
End Sub