因此,我正在設置一個宏,以在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