因此,我正在设置一个宏,以在Outlook中打开一个新窗口,并只显示我的收件箱中的子文件夹。我有大量的文件夹,需要弹出一个单独的窗口来帮助将电子邮件拖放到这些其他文件夹。VBA展望打开新窗口,只显示文件夹窗格
这是我目前设置的代码。我只是不知道如何关闭主电子邮件列表(成功关闭预览窗格)。
对不起,如果我的代码是sl。。我一直试图让这个问题得到解决。
Sub anothertesttoopen()
Dim oFolder As Outlook.Folder
For Each oaccount In Application.Session.Accounts
If oaccount = "[email protected]" Then
Set Store = oaccount.DeliveryStore
Set oFolder = Store.GetDefaultFolder(olFolderInbox).Folders.Item("Projects 2017") 'here it selects the inbox folder of account.
End If
Next
oFolder.Display
Dim myOlExp As Outlook.Explorer
Set myOlExp = Application.ActiveExplorer
myOlExp.ShowPane olPreview, Not myOlExp.IsPaneVisible(olPreview)
End Sub
为什么你有Excel标签? – 0m3r