【发布时间】:2015-01-06 21:49:34
【问题描述】:
用户使用 Outlook 2013 并在 Office365 中拥有帐户。我想在 Outlook 中创建类似地址簿的窗口。所以我创建了新的 Outlook 2013 插件来显示用户列表。代码如下所示:
var list = Globals.ThisAddIn.Application.Session.GetGlobalAddressList();
var users = list.AddressEntries.Cast<AddressEntry>()
.Where(ae => ae.AddressEntryUserType == OlAddressEntryUserType.olExchangeUserAddressEntry).ToList());
而且它有效。但作为交换,邮箱具有自定义属性并设置了一些主题。我想在我的列表中显示此属性,但我不知道如何检索它们。
在 Powershell 中你可以这样做:
Get-Mailbox -Identity alexB | FL
您可以看到此对象具有“CustomAttribute1”、“CustomAttribute2”等属性...如何在 Outlook 插件中执行相同操作。
【问题讨论】:
标签: c# outlook office-interop office365