使用 COM 搜索 Outlook 联系人?

发布于 2024-07-18 17:14:28 字数 158 浏览 5 评论 0 原文

我想向我的 ATL/WTL 应用程序添加对搜索本地 Outlook 联系人的支持。 有谁知道 Outlook COM 界面(Office 2003 或更高版本)允许您搜索联系人? 我已经有了 LDAP 查找支持,但用户也希望能够搜索他们的私人联系人。

任何信息都将受到欢迎。

I want to add support for searching for local Outlook contacts to my ATL/WTL app. Does anyone know of the Outlook COM interface (Office 2003 or greater) allows you to search for contacts? I already have LDAP lookup support but users want to be able to search their private contacts as well.

Any information would be welcome.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

美男兮 2024-07-25 17:14:28

要访问联系人,您首先必须使用应用程序的 GetNamespace 函数获取命名空间对象,并传递“MAPI”作为命名空间名称。

然后,您使用命名空间的 GetDefaultFolder 函数,该函数为您提供一个包含 Items 属性的 MAPIFolder 接口。

接下来,您对项目调用 Find 函数。

To get access to the contacts you first have to get a Namespace object using the Application's GetNamespace function, passing "MAPI" as the namespace name.

Then you use Namespace's GetDefaultFolder function, which gives you a MAPIFolder interface which contains an Items property.

Next you call the Find function on the items.

π浅易 2024-07-25 17:14:28

您必须使用 MAPI 才能访问

在这里您可以找到 MAPI 包装器

http://www.mapiex.aspx codeproject.com/KB/IP/CMapiEx.aspx

另外,您应该使用 Outlookspy,它非常有用的附加组件,可以向您展示大多数 MAPI 接口和 Outlook 对象模型

您应该从 MSDN 阅读有关 MAPI 函数的更多信息

http://msdn.microsoft.com/en-us/library/ aa142548(EXCHG.65).aspx

You must use MAPI to get access

Here you can find a MAPI wrapper

http://www.codeproject.com/KB/IP/CMapiEx.aspx

Also you should use Outlookspy, its very useful Add-on to show you most of MAPI interfaces and Outlook Object Model

You should read more about MAPI functions from MSDN

http://msdn.microsoft.com/en-us/library/aa142548(EXCHG.65).aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文