是否有可能获得共享日历的所有者 [Outlook Interop]
Is it possible to get owner of a shared calendar [Outlook Interop]
我想找到我在共享日历上创建的约会的所有者。这可能吗?
我通过以下操作从文件夹中获取了 storeId:
Folder folder = Appointment.Application.ActiveExplorer().CurrentFolder as Folder;
string storeid = folder.StoreID;
如何获取所有者?
这似乎并不像听起来那么容易。我以为有 Owner
属性,但不幸的是没有。
我发现这个 blog article 解释了如何从您已有的 StoreID
中提取所有者。
最重要的是将string
从十六进制表示转换,然后使用这个正则表达式:
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;
}
可在文章中找到 HexReader
的代码。
我想找到我在共享日历上创建的约会的所有者。这可能吗?
我通过以下操作从文件夹中获取了 storeId:
Folder folder = Appointment.Application.ActiveExplorer().CurrentFolder as Folder;
string storeid = folder.StoreID;
如何获取所有者?
这似乎并不像听起来那么容易。我以为有 Owner
属性,但不幸的是没有。
我发现这个 blog article 解释了如何从您已有的 StoreID
中提取所有者。
最重要的是将string
从十六进制表示转换,然后使用这个正则表达式:
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;
}
可在文章中找到 HexReader
的代码。