从全局地址列表MSDN中的AddressEntry对象的集合

从全局地址列表MSDN中的AddressEntry对象的集合

本文介绍了从全局地址列表MSDN中的AddressEntry对象的集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用下面的代码片段,我可以获得第一个匹配的单个addressEntry对象.如何在全局地址列表下获取匹配的addressEntries对象的集合.

Using below code snippet i can get single addressEntry object that is 1st matched. How to get the collection of matching addressEntries objects under global address list.

Microsoft.Office.Interop.Outlook.Application app = new Outlook.Application();
Outlook.AddressList gal = app.Session.GetGlobalAddressList();
Outlook.AddressEntry entry = gal.AddressEntries[name];

推荐答案

在扩展MAPI级别(C ++或Delphi)上,可以在PR_ANR上创建RES_PROPERTY限制,然后在相应的IABContainer的内容表上调用IMAPITable :: Restrict目的.这与Outlook在针对特定容器解析名称并显示模糊的名称对话框时使用的限制相同.

On the Extended MAPI level (C++ or Delphi), you can create a RES_PROPERTY restriction on PR_ANR and call IMAPITable::Restrict on the contents table of the corresponding IABContainer object. This is the same restriction used by Outlook when it resolves a name against a particular container and shows an ambiguous name dialog.

如果选择使用兑换,则可以使用其 RDOSession.Addresbook.GAL.ResolveNameEx 方法(返回RDOAddressEntries集合).

If using Redemption is an option, you can use its RDOSession.Addresbook.GAL.ResolveNameEx method (returns RDOAddressEntries collection).

这篇关于从全局地址列表MSDN中的AddressEntry对象的集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 02:55