View Single Post
  #1  
Old March 16th 06, 05:30 PM posted to microsoft.public.outlook
[email protected]
external usenet poster
 
Posts: 9
Default Sending HTML format report is not working

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:

HTMLHEADMETA HTTP-EQUIV="Content-Type"
CONTENT="text/html;charset=windows-1252"TITLERental
Confirmation/TITLE/HEADBODYTABLE BORDER=0 CELLSPACING=0
CELLPADDING=0 TR HEIGHT=31 TD WIDTH=4 BR/TDTD WIDTH=228
FONT SIZE=5 FACE="Book Antiqua" COLOR=#000000Order Confirmation/FONT/TDTD WIDTH=108 FONT SIZE=1 FACE="Arial" COLOR=#000000 /FONT/TDTD WIDTH=348 FONT SIZE=5 FACE="Book Antiqua" COLOR=#000000EZ Wireless Communications/FONT/TD/TR/TABLETABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 TR HEIGHT=21 TD WIDTH=4 BR/TDTD WIDTH=92 FONT SIZE=3 FACE="Book Antiqua" COLOR=#000000Order No.:/FONT/TDTD WIDTH=576 FONT SIZE=3 FACE="Book Antiqua" COLOR=#0000007251/FONT/TD/TR/TABLETABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 TR HEIGHT=15 TD WIDTH=4 BR/TDTD WIDTH=668 FONT SIZE=1 FACE="Book Antiqua" COLOR=#000000Your cellular phone rental order has been received and processed. Please confirm the following rental information:/FONT/TD/TR/TABLETABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 TR HEIGHT=21 TD WIDTH=8 BR/TDTD WIDTH=372 BUFONT SIZE=3 FACE="Book Antiqua" COLOR=#0000ffCustomer Information:/FONT/B/U/TDTD WIDTH=292 BUFONT SIZE=3 FACE="Book Antiqua" COLOR=#0000ffDelivery Information:/FONT/B/U/TD/TR/TABLETABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 TR HEIGHT=15 TD WIDTH=8 BR/TDTD WIDTH=372 FONT SIZE= .......Etc......


If you copy the whole source in a HTML editor like dreamweaver, it
gives you the exact format.
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.

Ads