View Single Post
  #8  
Old January 24th 06, 07:04 AM posted to microsoft.public.outlook.program_addins
Ram
external usenet poster
 
Posts: 19
Default how to change the mail message body

Hi,
explain me how to use
Inspector.HtmlEditor property to get IHtmlDocument2 interface.

--
Regards,

RamakoteswaraRao Koti

"Dmitry Streblechenko" wrote in message
...
You can load the HTML into the IHTMLDocument2 object and use DOM to modify
it or, if the item is already being displayed in an HTML editor, use thee
Inspector.HTMLEditor property to retrive IHTMLDocument2 interface.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Josh Einstein" wrote in message
...
One of the problems I had in an add in recently was that modifying the
Body property was naturally messing with HTML formatting and appending

to
the HTMLBody property does not have the desired effect because you need

to
"inject" into the HTML.

So I just used a very simple Regex replace to effectively insert text at
the beginning of the message (you could do the same thing with the end).

string htmlBody = email.HTMLBody;
htmlBody = Regex.Replace( htmlBody, "body[^]*?", "$&" +
whateverYouWant );
email.HTMLBody = htmlBody;

--
Josh Einstein
Einstein Technologies
Microsoft Tablet PC MVP
Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
www.tabletoutlook.com


"Ram" wrote in message
...

hi,

How to change the mail message body. When i am click send option,

i
have to add some more info at the end of the mail and will be send.

how can i solve this. i am using vc++6.0 and Outlook2000

Thanks in advance

--
Regards,

RamakoteswaraRao Koti








Ads