本文介绍了选择一个特定的Outlook文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我想选择一个特定的Outlook(2010)文件夹,例如说一个类似Outlook中的组织:
档案人员\收件箱
档案人员\ SentItems

和其他一些文件夹,例如:

档案人员\私人
档案人员\Privé\ [email protected]
档案人员\Privé\ [email protected]
档案人员\Privé\ [email protected]
档案人员\Privé\ [email protected]
档案人员\Privé\ [email protected]

我已经宣布:

Hello,

I want to select a specific Outlook (2010) folder, lets say for example an organization like that in my Outlook :
Dossiers personnels\Inbox
Dossiers personnels\SentItems

and some other folders like :

Dossiers personnels\Privé
Dossiers personnels\Privé\[email protected]
Dossiers personnels\Privé\[email protected]
Dossiers personnels\Privé\[email protected]
Dossiers personnels\Privé\[email protected]
Dossiers personnels\Privé\[email protected]

I''ve declared :

Imports Microsoft.Office.Interop
...

Dim app As Outlook.Application
Dim ns As Outlook.NameSpace
Dim siFolder As Outlook.Folder = Nothing

app = New Outlook.Application()
ns = app.GetNamespace("MAPI")
Dim olFolders As Outlook.Folders = ns.Folders



我可以选择带有
的INBOX没问题



I have no problem to select INBOX, with :

siFolder = CType(ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox), Outlook.Folder)



和SENTITEMS文件夹,带有:



and SENTITEMS Folders, with :

siFolder = CType(ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail), Outlook.Folder)




但是我不知道如何选择文件夹Privé",然后选择Privé\ [email protected]",依此类推...


感谢您的帮助.




But I don''t know how to select the folder "Privé", then "Privé\[email protected]", and so on ...


Thanks for your help.

推荐答案

siFolder = CType(ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Parent.folders("Privé"), Outlook.Folder)


这篇关于选择一个特定的Outlook文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 11:48