Slipstick Forums  

Go Back   Slipstick Forums > Outlook Programming > Programming Add-ins

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-07-2009, 07:08 AM
varun
Guest
 
Posts: n/a
Default major issue in outlook "Change in forward mail also change selected mail "

outlook change the body of selected mail if we change body of forward mail.
I have a sample application which i got from following site.
http://www.codeproject.com/KB/COM/outlookaddin.aspx
I attach the project on rapidshare, please get it from
http://rapidshare.com/files/302193923/sample1.rar.html
..
In this application i register inspector event. When select a mail in
outlook click on forward button it calls onnewinspector
here i change mailbody and return. After that i found mail body is also
change in selected mail.
So i think it's serious issue in Outlook.
In Onnewinspector below code change body

HRESULT CAddin::Invoke(DISPID dispidMember,REFIID riid,LCID lcid, WORD
wFlags,
DISPPARAMS* pDispParams, VARIANT* pvarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{

if(dispidMember = 0xf001)
{
if (!pDispParams)
return E_INVALIDARG;

if (pDispParams->cArgs > 0)
{
IDispatchPtr pDisp(pDispParams->rgvarg[0].pdispVal);
CComQIPtr<_Inspector> spInspector(pDisp);
IDispatchPtr dsptr = NULL;
spInspector->get_CurrentItem(&dsptr);
_MailItemPtr mptr = NULL;
mptr = dsptr;
_bstr_t bd = "this is new body";
if(mptr)
{
RecipientsPtr rptr = NULL;
mptr->get_Recipients(&rptr);
if(rptr)
{
long count = 0;
rptr->get_Count(&count);
if(count == 0)
mptr->put_Body(bd);
mptr = NULL;
}
}
}
}
return S_OK;
}



Reply With Quote
  #2  
Old 11-11-2009, 06:56 AM
varun
Guest
 
Posts: n/a
Default Re: major issue in outlook "Change in forward mail also change selected mail "

Is there no solution for this problem?
Or there is some possibility to handle this case
"varun" <varun.stellar@yahoo.co.in> wrote in message
news:eTyiQz5XKHA.1280@TK2MSFTNGP04.phx.gbl...
> outlook change the body of selected mail if we change body of forward
> mail.
> I have a sample application which i got from following site.
> http://www.codeproject.com/KB/COM/outlookaddin.aspx
> I attach the project on rapidshare, please get it from
> http://rapidshare.com/files/302193923/sample1.rar.html
> .
> In this application i register inspector event. When select a mail in
> outlook click on forward button it calls onnewinspector
> here i change mailbody and return. After that i found mail body is also
> change in selected mail.
> So i think it's serious issue in Outlook.
> In Onnewinspector below code change body
>
> HRESULT CAddin::Invoke(DISPID dispidMember,REFIID riid,LCID lcid, WORD
> wFlags,
> DISPPARAMS* pDispParams, VARIANT* pvarResult,
> EXCEPINFO* pExcepInfo, UINT* puArgErr)
> {
>
> if(dispidMember = 0xf001)
> {
> if (!pDispParams)
> return E_INVALIDARG;
>
> if (pDispParams->cArgs > 0)
> {
> IDispatchPtr pDisp(pDispParams->rgvarg[0].pdispVal);
> CComQIPtr<_Inspector> spInspector(pDisp);
> IDispatchPtr dsptr = NULL;
> spInspector->get_CurrentItem(&dsptr);
> _MailItemPtr mptr = NULL;
> mptr = dsptr;
> _bstr_t bd = "this is new body";
> if(mptr)
> {
> RecipientsPtr rptr = NULL;
> mptr->get_Recipients(&rptr);
> if(rptr)
> {
> long count = 0;
> rptr->get_Count(&count);
> if(count == 0)
> mptr->put_Body(bd);
> mptr = NULL;
> }
> }
> }
> }
> return S_OK;
> }
>
>
>



Reply With Quote
Reply

Bookmarks


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

BB 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
Batch change contact "file as" field in Outlook 2007 Netorius77 Outlook General 2 10-30-2009 03:31 AM
why outlook change forward mail Ashish Programming Add-ins 2 10-15-2009 09:31 AM
Outlook 2007: Change Signature vs. Change Mail Account Kenneth Wong Outlook General 0 09-01-2009 11:56 PM
(Outlook2003)Monitor change for "to" "cc" "bcc" on message compose dialog? ryotyankou via OfficeKB.com Programming Add-ins 6 08-31-2009 10:57 AM
How change default setting for "File As" in Outlook Contacts =?Utf-8?B?TEZhcm5pZQ==?= Contacts 1 05-23-2009 06:58 AM


All times are GMT -4. The time now is 04:27 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.