R
Ram
Hi ,
I have implemented addin for MSOutLook using VC++ 6.0. Here i have displayed a image and on that i have display some images,when i click that image that image should be aded to mail(which is in html mail format). In this i have added html code the mail by using following code.
while doing this i have added the html code the mail body, i have got one problem. here it is
HRESULT hr;
IDispatch *Pdisp;
IHTMLDocument2Ptr htmdocument=NULL;
IHTMLElement *htmelement;
BSTR m_bstr;
hr= ppt->ActiveInspector(&m_inspect);
hr=m_inspect->get_HTMLEditor(&Pdisp);
hr=Pdisp->QueryInterface(IID_IHTMLDocument2,(void**)&htmdocument);
hr=htmdocument->get_body(&htmelement);
htmelement->get_innerHTML(&m_bstr);
CComBSTR m_temp=CComBSTR(m_bstr);
m_temp.AppendBSTR(text);
m_temp.CopyTo(&m_bstr);
CString m_koti=CString(m_bstr);
MessageBox(NULL,m_koti,NULL,MB_OK);
htmdocument->put_designMode(CComBSTR("On"));
hr=htmelement->put_innerHTML(m_bstr);
htmelement->get_innerHTML(&m_bstr);
CString m_str=CString(m_bstr);
MessageBox(NULL,m_str,NULL,MB_OK);
This is the code which has been from mail . The last line which is in green colour i have added .
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>hi</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<P><FONT face=Arial size=2>Hi this is test mail</FONT> </P>
<P><FONT face=Arial size=2>By,</FONT> <BR><FONT face=Arial size=2>koti</FONT>
</P><A href="http://www.smileycapital.com"><IMG
src="http://img.smileycapital.com/images/Animals/animal_5019.gif"
border=0></A></BODY></HTML>
But after adding the html code to mail ,what is the adding is following code
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>hi</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<P><FONT face=Arial size=2>Hi this is test mail</FONT> </P>
<P><FONT face=Arial size=2>By,</FONT> <BR><FONT face=Arial size=2>koti</FONT>
</P><A href="BLOCKED::http://www.smileycapital.com"><IMG
src="BLOCKED::http://img.smileycapital.com/images/Animals/animal_5019.gif"
border=0></A></BODY></HTML>
Why the BLOCKED word is added to the code ,which is i am not added. why this code is adding. How can i avoid that proble. Plz suggest any solution?
--
Regards,
RamakoteswaraRao Koti
Software Engineer,
Nannacomputers Pvt Ltd
I have implemented addin for MSOutLook using VC++ 6.0. Here i have displayed a image and on that i have display some images,when i click that image that image should be aded to mail(which is in html mail format). In this i have added html code the mail by using following code.
while doing this i have added the html code the mail body, i have got one problem. here it is
HRESULT hr;
IDispatch *Pdisp;
IHTMLDocument2Ptr htmdocument=NULL;
IHTMLElement *htmelement;
BSTR m_bstr;
hr= ppt->ActiveInspector(&m_inspect);
hr=m_inspect->get_HTMLEditor(&Pdisp);
hr=Pdisp->QueryInterface(IID_IHTMLDocument2,(void**)&htmdocument);
hr=htmdocument->get_body(&htmelement);
htmelement->get_innerHTML(&m_bstr);
CComBSTR m_temp=CComBSTR(m_bstr);
m_temp.AppendBSTR(text);
m_temp.CopyTo(&m_bstr);
CString m_koti=CString(m_bstr);
MessageBox(NULL,m_koti,NULL,MB_OK);
htmdocument->put_designMode(CComBSTR("On"));
hr=htmelement->put_innerHTML(m_bstr);
htmelement->get_innerHTML(&m_bstr);
CString m_str=CString(m_bstr);
MessageBox(NULL,m_str,NULL,MB_OK);
This is the code which has been from mail . The last line which is in green colour i have added .
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>hi</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<P><FONT face=Arial size=2>Hi this is test mail</FONT> </P>
<P><FONT face=Arial size=2>By,</FONT> <BR><FONT face=Arial size=2>koti</FONT>
</P><A href="http://www.smileycapital.com"><IMG
src="http://img.smileycapital.com/images/Animals/animal_5019.gif"
border=0></A></BODY></HTML>
But after adding the html code to mail ,what is the adding is following code
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>hi</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<P><FONT face=Arial size=2>Hi this is test mail</FONT> </P>
<P><FONT face=Arial size=2>By,</FONT> <BR><FONT face=Arial size=2>koti</FONT>
</P><A href="BLOCKED::http://www.smileycapital.com"><IMG
src="BLOCKED::http://img.smileycapital.com/images/Animals/animal_5019.gif"
border=0></A></BODY></HTML>
Why the BLOCKED word is added to the code ,which is i am not added. why this code is adding. How can i avoid that proble. Plz suggest any solution?
--
Regards,
RamakoteswaraRao Koti
Software Engineer,
Nannacomputers Pvt Ltd