VSTO - Outlook 2007 How do I show a user property even when it's not present?

Posted by Yandros on Stack Overflow See other posts from Stack Overflow or by Yandros
Published on 2010-05-19T15:19:08Z Indexed on 2010/05/19 15:20 UTC
Read the original article Hit count: 250

I have added user property in a mail folder, let's call it UserProperty01. Some of the folder items have this property, some don't. I need to show in the folder's view if that property is set or not, so I added another property called UserProperty01Present, and I set it to true when I set the original property and false when I deleted it; then I added it to the folder's view.

The problem is that the little checkbox appears checked in those mails where the property is set, blank in those where the property was deleted... and nowhere at all in those where the property was never set in the first place.

My question is, is there any way to show the blank checkbox when the property is not set? The only alternative I found so far is looking in every mail item and setting it to false when it's not set every time the folder is opened; needless to say, I'm not very happy with this solution. Is there any other way?

Thank you for your time.

© Stack Overflow or respective owner

Related posts about c#

Related posts about vsto