A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

how to change the mail message body



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 22nd 06, 01:10 AM posted to microsoft.public.outlook.program_addins
Josh Einstein
external usenet poster
 
Posts: 57
Default how to change the mail message body

Oh by the way does that work for Word mail too?

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


"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








  #2  
Old January 23rd 06, 05:35 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default how to change the mail message body

No, in this case you need to use the Inspector.WordEditor property which
returns an instance of the Word.Document object.

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

"Josh Einstein" wrote in message
...
Oh by the way does that work for Word mail too?

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


"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










 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change advanced find to 'subject field and message body' ©® Outlook - General Queries 0 February 23rd 06 02:57 PM
How can I change the body of an appointment Raphael Outlook - Calandaring 1 February 16th 06 06:36 PM
How do I change the font of a mtg body in calendar details print? Mike Blasius Outlook - Calandaring 0 February 15th 06 02:53 PM
How can I change the content of my outlook e mail message header? jggome Outlook - Using Contacts 1 January 26th 06 03:32 AM
How to filter email with blank subject, to, and message body ken4az Outlook - Installation 0 January 20th 06 05:27 PM


All times are GMT +1. The time now is 04:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.