【问题标题】:Getting Contacts from folders in "Other Contacts"从“其他联系人”中的文件夹获取联系人
【发布时间】:2016-12-22 16:13:48
【问题描述】:

我有一个有效的代码 sn-p。

Dim Session As Outlook.NameSpace
Dim ContactFolder As Outlook.Folder
Set Session = Application.Session

Set ContactFolder = Session.GetDefaultFolder(olFolderContacts)

它将 ContactFolder 设置为 Outlook.Folder 类型,但它通过使用一些默认框架 olFolderContacts 来做到这一点。

我想将自定义文件夹设置为 ContactFolder 变量。具体来说,它们位于其他联系人中。我在 MSDN 上看到了一些涉及 entryID 的方法,但我无法获取自定义联系人文件夹的 entryID。

【问题讨论】:

    标签: vba outlook directory contacts


    【解决方案1】:

    如果文件夹是联系人文件夹的子文件夹:

    set subFolder = ContactFolder.Folders("My other contacts") 
    

    如果它与联系人文件夹在同一级别:

    set subFolder = ContactFolder.Parent.Folders("My other contacts") 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-08
      • 1970-01-01
      • 2017-06-22
      相关资源
      最近更新 更多