HTML Formating simple text mail received from other/Linux/Unix mail clients

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hello,
I am using outlook2003 and i am interacting with non outlook users that most
of them used to plain text. After short discussion thread the email body
become messy with lots of >>>> etc.
I want to be able to open such mail and convert it to something more
resonable to read by my eyes.

My approach was to convert the message to HTMLBody format, process the body
content and add HTML tags to it (fonts, color, indentetion etc) then save
the item.

It looks like these HTML tags are added as a simple text and does not affect
how the message is displayed.

Any pointer how to solve this or take another approach?
I am trying to stay with HTML and avoide RTF as some of the receipients
could still view html format.
Thanks in advance
David
 
Did you mean to show a code snippet to illustrate what you've been working
on?
 
this is work in progress and represents various trials to understand what is
going on and NOT a resonable code to work with. It just shows you what i am
trying to do. so with this here is the current code:

Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.ActiveInspector.CurrentItem
MyItem.BodyFormat = olFormatHTML
TempBody = Replace(MyItem.Body, ">", "===>", 1, -1, vbTextCompare)
MyItem.Body = TempBody
TempBody = Replace(MyItem.Body, "[", "[[", 1, -1, vbTextCompare)
MyItem.Body = TempBody
TempBody = Replace(MyItem.Body, "html", "-- XXXXXX - ", 1, -1,
vbTextCompare)
MyItem.Body = "<html><body><font face=""Terminal"" color=""FF0000"">" &
TempBody ' & "</font><body></html>"


david
 
David said:
this is work in progress and represents various trials to understand
what is going on and NOT a resonable code to work with. It just shows
you what i am trying to do. so with this here is the current code:

Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.ActiveInspector.CurrentItem
MyItem.BodyFormat = olFormatHTML
TempBody = Replace(MyItem.Body, ">", "===>", 1, -1, vbTextCompare)
MyItem.Body = TempBody
TempBody = Replace(MyItem.Body, "[", "[[", 1, -1, vbTextCompare)
MyItem.Body = TempBody
TempBody = Replace(MyItem.Body, "html", "-- XXXXXX - ", 1, -1,
vbTextCompare)
MyItem.Body = "<html><body><font face=""Terminal""
color=""FF0000"">" & TempBody ' & "</font><body></html>"


david

How about:
MyItem.HtmlBody = "<html><body><font face=""Terminal"" color=""FF0000"">" &
TempBody ' & "</font><body></html>"
 
yes. thanks. this is correct.
David
Tomski said:
David said:
this is work in progress and represents various trials to understand
what is going on and NOT a resonable code to work with. It just shows
you what i am trying to do. so with this here is the current code:

Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.ActiveInspector.CurrentItem
MyItem.BodyFormat = olFormatHTML
TempBody = Replace(MyItem.Body, ">", "===>", 1, -1, vbTextCompare)
MyItem.Body = TempBody
TempBody = Replace(MyItem.Body, "[", "[[", 1, -1, vbTextCompare)
MyItem.Body = TempBody
TempBody = Replace(MyItem.Body, "html", "-- XXXXXX - ", 1, -1,
vbTextCompare)
MyItem.Body = "<html><body><font face=""Terminal""
color=""FF0000"">" & TempBody ' & "</font><body></html>"


david

How about:
MyItem.HtmlBody = "<html><body><font face=""Terminal"" color=""FF0000"">" &
TempBody ' & "</font><body></html>"
 
Back
Top