none
Adding or Modifying Custom Named Properties on Outlook Attachments RRS feed

Answers

  • querying using getproiperty requires full DASL name of property, in your case it will be http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/TestPropertyName 

    and remember that getproperty will throw when property does not exist.

    • Marked as answer by Manidollars Thursday, May 30, 2013 5:12 AM
    Wednesday, May 29, 2013 7:31 AM
  • PropertyAccessor.SetProperty() also requires the full schema name as a DASL property tag, just as GetProperty() does.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "DamianD" <=?utf-8?B?RGFtaWFuRA==?=> wrote in message news:86c469d0-209b-4ce6-a250-be0de3d7571d...

    querying using getproiperty requires full DASL name of property, in your case it will be http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/TestPropertyName 

    and remember that getproperty will throw when property does not exist.


    Ken Slovak MVP - Outlook
    • Marked as answer by Manidollars Thursday, May 30, 2013 5:12 AM
    Wednesday, May 29, 2013 2:43 PM
    Moderator

All replies

  • Have you tried Attachment.PropertyAccesor.SetProperty?

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

    Wednesday, May 29, 2013 3:25 AM
  • Hi Dmitry,

    Yes, I tried following, but it throws an exception of invalid format. 

    I guess this method requires proptag to set or get properties.

    object  property = att.PropertyAccessor.GetProperty("TestPropertyName");
    
    
    att.PropertyAccessor.SetProperty("TestPropertyName", "testing saved property value");

    I am trying to achieve similar action to what we get by UserProperties method under MailtItem object.


    MS

    Wednesday, May 29, 2013 4:46 AM
  • querying using getproiperty requires full DASL name of property, in your case it will be http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/TestPropertyName 

    and remember that getproperty will throw when property does not exist.

    • Marked as answer by Manidollars Thursday, May 30, 2013 5:12 AM
    Wednesday, May 29, 2013 7:31 AM
  • PropertyAccessor.SetProperty() also requires the full schema name as a DASL property tag, just as GetProperty() does.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "DamianD" <=?utf-8?B?RGFtaWFuRA==?=> wrote in message news:86c469d0-209b-4ce6-a250-be0de3d7571d...

    querying using getproiperty requires full DASL name of property, in your case it will be http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/TestPropertyName 

    and remember that getproperty will throw when property does not exist.


    Ken Slovak MVP - Outlook
    • Marked as answer by Manidollars Thursday, May 30, 2013 5:12 AM
    Wednesday, May 29, 2013 2:43 PM
    Moderator
  • Thanks Damian & Ken it works like a charm. I am able to store and retrieve named properties.

    MS

    Thursday, May 30, 2013 5:12 AM