Accessing contact's custom properties in a Outlook 2007 form region

K

Kiran

We have added a form region to contact details form where there are some winform controls which we have data bound to contact custom properties. There is a separate app which creates contacts in exchange server (2003) for different mailboxes using Web Dav protocol. While creating the contact it creates these custom properties also. When I read the contact properties using Web dav from exchange server, I get all the values that I initially wrote. But the same in not showing in Outlook from region. We are using ContactItem.ItemProperties which we get from ActiveInspector.CurrentItem to read those custom properties in the form region. I have tried ContactItem.UserProperties also, but even that does not work. Am I missing something here. Thanks in advance..
Submitted using http://www.outlookforums.com
 
K

Ken Slovak - [MVP - Outlook]

No need to post twice.

Just adding a named property to the PS_PUBLIC_STRINGS namespace doesn't make
it an Outlook UserProperty. In addition to adding the property to that
namespace you'd need to hack the undocumented binary blob that Outlook uses
to recognize a UserProperty from a named property in PS_PUBLIC_STRINGS.

The blob can be associated with the item if the UserProperty is only on the
item, or it can be part of a hidden message in the folder with a
MessageClass of IPC.MS.REN.USERFIELDS, in which case the blob is contained
in the property PR_USERFIELDS (0x36E30102), if the UserProperty was added to
the folder fields.

Read your property using the Outlook 2007 PropertyAccessor for the item,
using the PS_PUBLIC_STRINGS namespace as part of the DASL property tag you
supply to PropertyAccessor for any of the property set/get methods.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top