Results 1 to 2 of 2

Thread: major issue in outlook "Change in forward mail also change selected mail "

  1. #1
    varun Guest

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




  2. #2
    varun Guest

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




Similar Threads

  1. Mail Format Changes from HTML to RTF Upon Forward - How to change
    By Delnang in forum Programming Forms Archive
    Replies: 7
    Last Post: 01-12-2010, 07:07 AM
  2. how to add my custom items to "Change E-mail Account" dialog
    By spylogsster in forum Programming Add-ins Archive
    Replies: 1
    Last Post: 11-22-2009, 02:10 PM
  3. Re: Is it possible to change the "mail received" sound in Outlook
    By Ñukallatak in forum Installation Archive
    Replies: 2
    Last Post: 11-10-2009, 02:27 AM
  4. why outlook change forward mail
    By Ashish in forum Programming Add-ins Archive
    Replies: 2
    Last Post: 10-15-2009, 05:31 AM
  5. (Outlook2003)Monitor change for "to" "cc" "bcc" on message compose dialog?
    By ryotyankou via OfficeKB.com in forum Programming Add-ins Archive
    Replies: 6
    Last Post: 08-31-2009, 06:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts