RichText support for new Outlook Email message..?

Add-in Express™ Support Service
That's what is more important than anything else

RichText support for new Outlook Email message..?
Creating an custom Email dialog, using a RichText Edit in Delphi 
Johnny Bravenboer




Posts: 13
Joined: 2006-03-20
Hi again,

In my Delphi project I have created a custom Email dialogue that sends Email messages via Outlook and sending messages works fine.

For the message body I'm using a RichText Edit and have included most of the common RichText formatting options (such as Bold, Italic, Underlined, Bullets, etc) but upon sending the message, all RichText formatting is lost.

My question is:

Is there a way to send the RichText formatted text from a RichText Edit control via Outlook, without converting the RichText to HTML first?

What I've tried so far (other than converting RTF to HTML):


  IMail.Body := RichEdit1.Text;


All RichText formatting will then be lost.


  IMail.Body := ExtractRichText(RichEdit1);


The ExtractRichText function extracts the text from a RichText Edit with all the RichText tags and returns it as a String. When using this approach the message body is displayed as plain-text with all of the RTF tags visible.


  IMail.HTMLBody := ExtractRichText(RichEdit1);


The displayed result is basically the same as using the Body property, except that the message is now an HTML message.

Cheers,

John... ;)
Posted 26 Sep, 2006 01:08:20 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi John,

Is there a way to send the RichText formatted text from a RichText Edit control via Outlook, without converting the RichText to HTML first?


The Outlook Object Model doesn't allow working with Rich Text format directly. You can work with plain text or HTML format only.

Posted 26 Sep, 2006 08:46:10 Top
Jason Coley




Posts: 272
Joined: 2005-05-26
you can do this by setting the text in the body using Extended MAPI, look for examples on the net.
Posted 07 Oct, 2006 20:56:33 Top