none
failed to execute GetProperty function of _PropertyAccessor RRS feed

  • Question

  • HI,

    I want to read a property using _PropertyAccessor, but is failed with a HRESULT error code 8004010f, but I did see the right value of the property  with outlook spy.

    Here is the main code below:

    CComQIPtr<Outlook::_PropertyAccessor> spPropAccessor; spAddEntry->get_PropertyAccessor(&spPropAccessor);

    if (NULL != spPropAccessor) { CComVariant varSendName = (L""); BSTR bstrPropName = SysAllocString(L"http://schemas.microsoft.com/mapi/proptag/0x0C1A001F"); HRESULT hr = spPropAccessor->GetProperty(bstrPropName, &varSendName); }


    Tuesday, November 12, 2013 6:53 AM

Answers

  • You should be able to retrieve any kind of property. The error in this case means the property is not there.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by SaraZC Thursday, November 14, 2013 1:51 AM
    Wednesday, November 13, 2013 1:18 PM

All replies

  • The error is MAPI_E_NOT_FOUND. Where exactly does the message come from?

    Why not simply use MailItem.SenderName property?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, November 12, 2013 1:44 PM
  • Hi,Dmitry,

    I used it just to test GetProperty function.

    And I confused which kind property can visit with both api and GetPropery and which kind of property can only visited by GetProperty?

     

    Wednesday, November 13, 2013 11:31 AM
  • You should be able to retrieve any kind of property. The error in this case means the property is not there.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by SaraZC Thursday, November 14, 2013 1:51 AM
    Wednesday, November 13, 2013 1:18 PM