【发布时间】:2017-02-14 04:18:31
【问题描述】:
所以我正在设置一个宏以在 Outlook 中打开一个新窗口,并且只显示我的收件箱中的子文件夹。我有大量文件夹,需要弹出一个单独的窗口来帮助将电子邮件拖放到这些其他文件夹。
这是我当前设置的代码。我只是不知道如何关闭主电子邮件列表(成功关闭预览窗格)。
对不起,如果我的代码草率。我一直在努力解决这个问题。
Sub anothertesttoopen()
Dim oFolder As Outlook.Folder
For Each oaccount In Application.Session.Accounts
If oaccount = "email@myemail.com" 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 标签?