Jump to userdefined folder in Outlook 2019
Hi
by clicking the macro the Ol folder should be opened.
I can do this and jump to Inbox
Code:
Sub ChangeViewtoFolderPosteingang()
Dim ns As Outlook.NameSpace
Set ns = Application.GetNamespace("MAPI")
Dim Exp As Outlook.Explorer
Set Exp = Application.ActiveExplorer
Dim myInbox As Folder
Set myInbox = ns.GetDefaultFolder(olFolderInbox)
Dim folder1 As Folder
Set folder1 = myInbox
Set Exp.CurrentFolder = folder1
End Sub
WORX!
And jump to subfolder of Inbox:
Code:
Sub ChangeViewtoFolderFAX()
Dim ns As Outlook.NameSpace
Set ns = Application.GetNamespace("MAPI")
Dim Exp As Outlook.Explorer
Set Exp = Application.ActiveExplorer
Dim myInbox As Folder
Set myInbox = ns.GetDefaultFolder(olFolderInbox)
Dim folder1 As Folder
Set folder1 = myInbox.Folders.Item("FAX")
Set Exp.CurrentFolder = folder1
End Sub
WORX too!
But How to jump to user defined Folder # Datenbank?
http://www.vbaexpress.com/forum/imag...BJRU5ErkJggg==
The folder # Datenbank is in the main Tree!
Hope for help