Rick Dalgren
Posts: 11
Joined: 2006-06-26
|
Using Redemption in a stand-alone application, I've added four properties to contacts (I can write/read to these properties).
I would like to be able to access these properties in my add-in. I'm looking at the MAPI Store Accessor and I can see how to access them. While I see the enumeration for the property tags, I can't seem to figure out to find out the property tags for my properties.
Is this possible??
Thanks!
|
|
Rick Dalgren
Posts: 11
Joined: 2006-06-26
|
Well, following the example for getting and setting the values in MAPI properties, I'm able to get the value from a contact (I'm getting the tag id from Redemption).
But, when I try to set the value, I get the following error:
The Client Operation Failed
Microsoft Exchange Information Store
|
|
Eugene Astafiev
Guest
|
Hello Rick,
To access a custom or user-defined property via the MAPI Store Accessor you should know the id of the property. The Outlook Object Model allows you to access user-defined properties via the UserProperties collection ( and there is no way to acces custom properties via OOM). I have tested the following code against an Exchange server in both cached and non-cached modes:
Outlook.NameSpace ns = OutlookApp.GetNamespace("MAPI");
Outlook.MAPIFolder folder = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
Outlook.ContactItem item = folder.Items.Item(1) as Outlook.ContactItem;
int ok = adxmapiStoreAccessor1.SetProperty(item, 0x65600003U, 111);
if (ok == 0)
{
System.Windows.Forms.MessageBox.Show("Succeded");
}
|
|