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... ;) |
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
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.
|
|
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. |
|