none
how to deal with IMsgStore to change subject and body. RRS feed

  • Question

  • Hi,

    I am working on outlook addin

    my addin works perfect, 

    bool CAddin::OnNewMailExSEH(BSTR bstrEntryID)

    CComPtr<Outlook::_NameSpace> pNameSpace;
    HRESULT hr = E_FAIL;

    hr = m_spApp->get_Session(&pNameSpace);
    if (FAILED(hr))
    {
    return false;
    }

    if (pNameSpace)
    {
    CComVariant vOptional(DISP_E_PARAMNOTFOUND, VT_ERROR);
    CComPtr<IDispatch> pItemDisp;
    CComQIPtr<Outlook::_MailItem> pMailItem;

    hr = pNameSpace->GetItemFromID(bstrEntryID, vOptional, &pItemDisp);

    if (FAILED(hr))
    {
    return false;
    }

    pMailItem = pItemDisp;

    if (!pMailItem)
    {
    return false;
    }



    using pMailItem , i can get mail subject, body.

    even i can modify it, but it sync with server and i dont want that.

    someone gives me solution for IID_IProxyStoreObject now i can get 

    IMsgStore *pUnwrappedStore = NULL;

    but i dont know how to deal with this.

    how can i get mail subject (or) body & and how can i change the subject.

    if anyone knows please help me.
    Friday, September 11, 2015 12:45 PM

Answers

All replies