Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: how to change the mail message body

Geek News

how to change the mail message body
"Ram" <koti[ at ]nannacomputers.com> 1/20/2006 12:46:33 PM

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


Re: how to change the mail message body
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 1/20/2006 6:03:09 PM
Set the Body or HTMLBody property.

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

"Ram" <koti[ at ]nannacomputers.com> wrote in message
news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
>
> 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
>
>


Re: how to change the mail message body
"Josh Einstein" <josheinstein[ at ]hotmail.com> 1/21/2006 4:57:12 PM
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" <koti[ at ]nannacomputers.com> wrote in message
news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
>
> 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
>
>


Re: how to change the mail message body
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 1/21/2006 6:52:36 PM
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" <josheinstein[ at ]hotmail.com> wrote in message
news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
[Quoted Text]
> 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" <koti[ at ]nannacomputers.com> wrote in message
> news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
>>
>> 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
>>
>>
>
>


Re: how to change the mail message body
"Josh Einstein" <josheinstein[ at ]hotmail.com> 1/22/2006 1:10:06 AM
Thanks, Dmitry that sounds like a much better approach. Mine was for a quick
one-off internal add in.

--
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" <dmitry[ at ]dimastr.com> wrote in message
news:OZrGsurHGHA.2668[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> 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" <josheinstein[ at ]hotmail.com> wrote in message
> news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
>> 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" <koti[ at ]nannacomputers.com> wrote in message
>> news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
>>>
>>> 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
>>>
>>>
>>
>>
>
>


Re: how to change the mail message body
"Josh Einstein" <josheinstein[ at ]hotmail.com> 1/22/2006 1:10:51 AM
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" <dmitry[ at ]dimastr.com> wrote in message
news:OZrGsurHGHA.2668[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> 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" <josheinstein[ at ]hotmail.com> wrote in message
> news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
>> 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" <koti[ at ]nannacomputers.com> wrote in message
>> news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
>>>
>>> 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
>>>
>>>
>>
>>
>
>


Re: how to change the mail message body
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 1/23/2006 5:35:21 AM
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" <josheinstein[ at ]hotmail.com> wrote in message
news:eO7Z0CvHGHA.3700[ at ]TK2MSFTNGP15.phx.gbl...
[Quoted Text]
> 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" <dmitry[ at ]dimastr.com> wrote in message
> news:OZrGsurHGHA.2668[ at ]tk2msftngp13.phx.gbl...
>> 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" <josheinstein[ at ]hotmail.com> wrote in message
>> news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
>>> 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" <koti[ at ]nannacomputers.com> wrote in message
>>> news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
>>>>
>>>> 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
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Re: how to change the mail message body
"Ram" <koti[ at ]nannacomputers.com> 1/24/2006 7:04:09 AM
Hi,
explain me how to use
Inspector.HtmlEditor property to get IHtmlDocument2 interface.

--
Regards,

RamakoteswaraRao Koti

"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
news:OZrGsurHGHA.2668[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> 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" <josheinstein[ at ]hotmail.com> wrote in message
> news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
> > 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" <koti[ at ]nannacomputers.com> wrote in message
> > news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
> >>
> >> 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
> >>
> >>
> >
> >
>
>


Re: how to change the mail message body
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 1/24/2006 5:40:49 PM
Dim MyDoc as IHtmlDocument2
....
set MyDoc = Inspector.HtmlEditor

I am not sure I understand your question, as simple as it sounds.

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

"Ram" <koti[ at ]nannacomputers.com> wrote in message
news:%23RwggQLIGHA.1424[ at ]TK2MSFTNGP12.phx.gbl...
[Quoted Text]
> Hi,
> explain me how to use
> Inspector.HtmlEditor property to get IHtmlDocument2
> interface.
>
> --
> Regards,
>
> RamakoteswaraRao Koti
>
> "Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
> news:OZrGsurHGHA.2668[ at ]tk2msftngp13.phx.gbl...
>> 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" <josheinstein[ at ]hotmail.com> wrote in message
>> news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
>> > 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" <koti[ at ]nannacomputers.com> wrote in message
>> > news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
>> >>
>> >> 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
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Re: how to change the mail message body
"Ram" <koti[ at ]nannacomputers.com> 1/27/2006 9:52:37 AM
Helllo Dmitry,

Thanks your help. i can understand how to create
IHTMLDocument object in VB. I need in VC++6.0.

i have done like this,
IDispatch *Pdisp=NULL;

CComPtr<Outlook::_Application>m_applicant(m_spApp);

CComPtr<Outlook::_Inspector>m_inspect;

HRESULT hr;

IHTMLDocument2 *htmdocument=NULL;

COMPtr<Outlook::_Inspector>m_applicant
HRESULT hr;
hr= m_applicant->ActiveInspector(&m_inspect);

if(FAILED(hr))

MessageBox(NULL,_T("This is not active inspector object"),_T("Current
Inspector"),MB_OK);

else

MessageBox(NULL,_T("This is active inspector object"),_T("Current
Inspector"),MB_OK);

m_inspect->get_HTMLEditor(&Pdisp);

Pdisp->QueryInterface(IID_IHTMLDocument2,(void**)&htmdocument);


But its gives runtime errors when i use this ,in oulook plugin

Can you suggest any solution.
--

Regards,

RamakoteswaraRao Koti
Software Engineer,
Nannacomputers Pvt Ltd

"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
news:#pqNi0QIGHA.3700[ at ]TK2MSFTNGP15.phx.gbl...
[Quoted Text]
> Dim MyDoc as IHtmlDocument2
> ...
> set MyDoc = Inspector.HtmlEditor
>
> I am not sure I understand your question, as simple as it sounds.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Ram" <koti[ at ]nannacomputers.com> wrote in message
> news:%23RwggQLIGHA.1424[ at ]TK2MSFTNGP12.phx.gbl...
> > Hi,
> > explain me how to use
> > Inspector.HtmlEditor property to get IHtmlDocument2
> > interface.
> >
> > --
> > Regards,
> >
> > RamakoteswaraRao Koti
> >
> > "Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
> > news:OZrGsurHGHA.2668[ at ]tk2msftngp13.phx.gbl...
> >> 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" <josheinstein[ at ]hotmail.com> wrote in message
> >> news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
> >> > 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" <koti[ at ]nannacomputers.com> wrote in message
> >> > news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
> >> >>
> >> >> 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
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>


Re: how to change the mail message body
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 1/27/2006 5:21:56 PM
Did you make sure Pdisp is not NULL? It will be if you are using Word or
plain text editor.

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

"Ram" <koti[ at ]nannacomputers.com> wrote in message
news:%23AX8kcyIGHA.1848[ at ]TK2MSFTNGP12.phx.gbl...
[Quoted Text]
> Helllo Dmitry,
>
> Thanks your help. i can understand how to create
> IHTMLDocument object in VB. I need in VC++6.0.
>
> i have done like this,
> IDispatch *Pdisp=NULL;
>
> CComPtr<Outlook::_Application>m_applicant(m_spApp);
>
> CComPtr<Outlook::_Inspector>m_inspect;
>
> HRESULT hr;
>
> IHTMLDocument2 *htmdocument=NULL;
>
> COMPtr<Outlook::_Inspector>m_applicant
> HRESULT hr;
> hr= m_applicant->ActiveInspector(&m_inspect);
>
> if(FAILED(hr))
>
> MessageBox(NULL,_T("This is not active inspector object"),_T("Current
> Inspector"),MB_OK);
>
> else
>
> MessageBox(NULL,_T("This is active inspector object"),_T("Current
> Inspector"),MB_OK);
>
> m_inspect->get_HTMLEditor(&Pdisp);
>
> Pdisp->QueryInterface(IID_IHTMLDocument2,(void**)&htmdocument);
>
>
> But its gives runtime errors when i use this ,in oulook
> plugin
>
> Can you suggest any solution.
> --
>
> Regards,
>
> RamakoteswaraRao Koti
> Software Engineer,
> Nannacomputers Pvt Ltd
>
> "Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
> news:#pqNi0QIGHA.3700[ at ]TK2MSFTNGP15.phx.gbl...
>> Dim MyDoc as IHtmlDocument2
>> ...
>> set MyDoc = Inspector.HtmlEditor
>>
>> I am not sure I understand your question, as simple as it sounds.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Ram" <koti[ at ]nannacomputers.com> wrote in message
>> news:%23RwggQLIGHA.1424[ at ]TK2MSFTNGP12.phx.gbl...
>> > Hi,
>> > explain me how to use
>> > Inspector.HtmlEditor property to get IHtmlDocument2
>> > interface.
>> >
>> > --
>> > Regards,
>> >
>> > RamakoteswaraRao Koti
>> >
>> > "Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
>> > news:OZrGsurHGHA.2668[ at ]tk2msftngp13.phx.gbl...
>> >> 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" <josheinstein[ at ]hotmail.com> wrote in message
>> >> news:O493DvqHGHA.3408[ at ]TK2MSFTNGP12.phx.gbl...
>> >> > 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" <koti[ at ]nannacomputers.com> wrote in message
>> >> > news:On3EK9bHGHA.2064[ at ]TK2MSFTNGP09.phx.gbl...
>> >> >>
>> >> >> 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
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net