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

different problem



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 28th 06, 09:28 PM posted to microsoft.public.outlook.program_addins
Ram
external usenet poster
 
Posts: 19
Default different problem

hi,

i have captured itemsend event. When ever the user click the send
button, i used to add some data at the end of mail. It has been adding. It
showing in the view,but when the mail is sent.it is not with mail.

how can i solve this

--
Regards,

RamakoteswaraRao Koti


Ads
  #2  
Old January 29th 06, 09:28 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default different problem

Please show the relevant snippets of your code.

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

"Ram" wrote in message
...
hi,

i have captured itemsend event. When ever the user click the send
button, i used to add some data at the end of mail. It has been adding. It
showing in the view,but when the mail is sent.it is not with mail.

how can i solve this

--
Regards,

RamakoteswaraRao Koti




  #3  
Old January 30th 06, 05:33 AM posted to microsoft.public.outlook.program_addins
Ram
external usenet poster
 
Posts: 19
Default different problem



Here is ther code, which i am written in "itemsend" event .





CComPtrOutlook::_Applicationm_applicant(m_spApp) ;

CComPtrOutlook::_Inspectorm_inspect;



HRESULT hr;

IDispatch *Pdisp;

IHTMLDocument2Ptr htmdocument=NULL;

IHTMLElement *htmelement;

BSTR m_bstr;

char ks[20000];

int net_lenght;

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);

*/

hr=m_inspect-get_HTMLEditor(&Pdisp);


if(FAILED(hr))

MessageBox(NULL,_T("HTML Editor object is not
creating"),_T("Simleys"),MB_OK);

hr=Pdisp-QueryInterface(IID_IHTMLDocument2,(void**)&htmdoc ument);


if(FAILED(hr)||(htmdocument==NULL))

{

MessageBox(NULL,_T("IHTMLDocument Object is not
creating"),_T("Smileys"),MB_OK);

}

/*

else

MessageBox(NULL,_T("IHTMLDocument Object is not
creating"),_T("Smileys"),MB_OK);

*/



hr=htmdocument-get_body(&htmelement);

if(FAILED(hr))

{

MessageBox(NULL,_T("The htmelement is not intiated"),_T("Smileys"),MB_OK);

}


htmelement-get_innerHTML(&m_bstr);

net_lenght=WideCharToMultiByte(CP_ACP,0,m_bstr,-1,NULL,0,NULL,NULL);

WideCharToMultiByte(CP_ACP,0,m_bstr,-1,ks,net_lenght+1,NULL,NULL);

strcat(ks,"Here is text wiill be added");

net_lenght=sizeof(ks);

MultiByteToWideChar(CP_ACP,NULL,ks,-1,m_bstr,net_lenght+1);

htmdocument-put_designMode(CComBSTR("On"));

hr=htmelement-put_innerHTML(m_bstr);

if(hr==S_OK)


MessageBox(NULL,_T("Here text Added"),_T("Smileys"),MB_OK);

else


MessageBox(NULL,_T("text is not added"),_T("Smileys"),MB_OK);



htmdocument-put_designMode(CComBSTR("Off"));


Plz suggest me any solution



--
Regards,

RamakoteswaraRao Koti

"Dmitry Streblechenko" wrote in message
...
Please show the relevant snippets of your code.

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

"Ram" wrote in message
...
hi,

i have captured itemsend event. When ever the user click the send
button, i used to add some data at the end of mail. It has been adding.

It
showing in the view,but when the mail is sent.it is not with mail.

how can i solve this

--
Regards,

RamakoteswaraRao Koti






  #4  
Old January 30th 06, 05:12 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default different problem

Does it work Ok if you set the MailItem.HTMLBody property instead?

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

"Ram" wrote in message
...


Here is ther code, which i am written in "itemsend" event .





CComPtrOutlook::_Applicationm_applicant(m_spApp) ;

CComPtrOutlook::_Inspectorm_inspect;



HRESULT hr;

IDispatch *Pdisp;

IHTMLDocument2Ptr htmdocument=NULL;

IHTMLElement *htmelement;

BSTR m_bstr;

char ks[20000];

int net_lenght;

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);

*/

hr=m_inspect-get_HTMLEditor(&Pdisp);


if(FAILED(hr))

MessageBox(NULL,_T("HTML Editor object is not
creating"),_T("Simleys"),MB_OK);

hr=Pdisp-QueryInterface(IID_IHTMLDocument2,(void**)&htmdoc ument);


if(FAILED(hr)||(htmdocument==NULL))

{

MessageBox(NULL,_T("IHTMLDocument Object is not
creating"),_T("Smileys"),MB_OK);

}

/*

else

MessageBox(NULL,_T("IHTMLDocument Object is not
creating"),_T("Smileys"),MB_OK);

*/



hr=htmdocument-get_body(&htmelement);

if(FAILED(hr))

{

MessageBox(NULL,_T("The htmelement is not intiated"),_T("Smileys"),MB_OK);

}


htmelement-get_innerHTML(&m_bstr);

net_lenght=WideCharToMultiByte(CP_ACP,0,m_bstr,-1,NULL,0,NULL,NULL);

WideCharToMultiByte(CP_ACP,0,m_bstr,-1,ks,net_lenght+1,NULL,NULL);

strcat(ks,"Here is text wiill be added");

net_lenght=sizeof(ks);

MultiByteToWideChar(CP_ACP,NULL,ks,-1,m_bstr,net_lenght+1);

htmdocument-put_designMode(CComBSTR("On"));

hr=htmelement-put_innerHTML(m_bstr);

if(hr==S_OK)


MessageBox(NULL,_T("Here text Added"),_T("Smileys"),MB_OK);

else


MessageBox(NULL,_T("text is not added"),_T("Smileys"),MB_OK);



htmdocument-put_designMode(CComBSTR("Off"));


Plz suggest me any solution



--
Regards,

RamakoteswaraRao Koti

"Dmitry Streblechenko" wrote in message
...
Please show the relevant snippets of your code.

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

"Ram" wrote in message
...
hi,

i have captured itemsend event. When ever the user click the
send
button, i used to add some data at the end of mail. It has been adding.

It
showing in the view,but when the mail is sent.it is not with mail.

how can i solve this

--
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


All times are GMT +1. The time now is 04:12 AM.


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.