适用于 Outlook 的 Visual Basic VSTO 插件:在活动资源管理器中显示文件夹

Visual Basic VSTO plugin for Outlook: Show folder in active Explorer

我在 VBA 中有一个工作代码,按名称查找文件夹,然后在主 window 中打开它,如下所示:

Set LookupFolder = nSpace.Folders(mailboxNameLabel).Folders(destinationFolder)

将我的项目移动到 Visual Studio (vb.net) 时,我被告知:

'Let' and 'Set' assignment statements are no longer supported

只是省略了 "Set" 单词,不起作用,使用此代码无法打开文件夹:

LookupFolder = nSpace.Folders(mailboxNameLabel).Folders(destinationFolder)

如果我使用 "Display" 方法,文件夹将以新的最小化方式打开 window:

nSpace.Folders(mailboxNameLabel).Folders(destinationFolder).Display()

我如何设法在我的活动资源管理器中打开该文件夹(只需 "jump" 到该文件夹​​,因为它以前工作)?

提前致谢

Application.ActiveExplorer.CurrentFolder 属性 设置为文件夹对象。