Reputation: 795
I want to find the owner of an appointment I'm creating on a shared calender. Is that possible?
I'm having the storeId from the folder by doing:
Folder folder = Appointment.Application.ActiveExplorer().CurrentFolder as Folder;
string storeid = folder.StoreID;
How can I get the owner?
Upvotes: 2
Views: 893
Reputation: 157018
It doesn't seem as easy as it sounds. I thought there was an Owner
property, but there isn't unfortunately.
I found this blog article that explains how you can extract the owner from the StoreID
you already have.
The most important thing is to convert the string
from a hexadecimal representation, and then use this regex:
private string ParseEntryID(string storeID)
{
string s = HexReader.GetString(storeID);
//TODO: These values might be different depending on
what you have named your groups in ESM
const string REG_EX = @"/o=First Organization/ou=First
Administrative Group/cn=Recipients/cn=(\w+)";
Match m = Regex.Match(s, REG_EX);
return m.Value;
}
The code for the HexReader
can be found in the article.
Upvotes: 1