You need to set HTMLBody, not Body.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
wrote in message ups.com...
I have been sending RTF report from Ms Access on the body of the email.
I need to send it in HTML format instead, but it is not working. The
body of the email displays the whole source instead of the HTML
formatted body. I have realized that the email format shows "Plain
Text" and "Rich Text" format only. If you have further questions,
please do not hesitate to contact me.
Below there is an example of what I am getting, please check:
I do not know if I have to change a setting in ms outlook or change the
code I have which is:
Dim strline, strHTML
Dim OL As Outlook.Application
Dim MyItem As Outlook.MailItem
Set OL = New Outlook.Application
Set MyItem = Outlook.Application.CreateItem(olMailItem)
If Me.Status Like "*Reserved*" Or Me.Status Like "*rent*" Then
DoCmd.OutputTo acOutputReport, "Rental Confirmation", acFormatHTML,
"C:\Order.html"
MyItem.Subject = "ORDER CONFIRMATION - Cellular phone rental Order" & "
" & Me.Invoice_No
End If
Open "C:\Order.html" For Input As 1
Do While Not EOF(1)
Input #1, strline
strHTML = strHTML & strline
Loop
Close 1
If Left(OL.Version, 2) = "10" Then
MyItem.bodyformat = olFormatHTML
End if
MyItem.Body = strHTML
MyItem.To = Me.email
MyItem.Display
End Sub
Thank you in advance for your help.