无法访问Outlook 2010 VB.Net中的共享联系人文件夹

问题描述:

我正在创建Outlook加载项,使用vb.net进入共享文件夹时遇到问题.

Im creating outlook add-in and I am having problems getting into Shared folder using vb.net.

我尝试过

contactsFolder = ns.Folders.Item("Shared Contacts")

contactsFolder = ns.Folders.Item("Public Folders")

仍然无法访问它.有谁可以帮助我吗.我不断收到错误消息:

still have no way of accessing it. can someone help me please. I keep getting error:

The attempted operation failed.  An object could not be found.

由于您使用的是共享文件夹,因此该文件夹不能存在于 Store .您可能需要枚举 Session.Stores ( ns.Stores ).有关代码示例,请参见相关的SO帖子.

Since you are using a shared folder, the folder must not exist in the default Store. You probably need to enumerate Session.Stores (ns.Stores). See related SO post for code example.