So I am working on setting up a macro to open up a new window in outlook and only show the sub-folders in my inbox. I have a ton of folders and need to have a separate window pop up to help with drag-n-drop emails to these other folders.
Here is the code that i have currently setup. I just dont know how to turn off the main email list (was successful in turning off the preview pane).
sorry if my code is sloppy. i've just been trying to get this hashed out.
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