in the navigation pane in Outlook 2016 I can right-click a sub-folder and select "move up" or "move down" to change the order. But I can't find the corresponding VBA command to do this.
Does anyone have an idea where to look? (It's not in Outlook.Folder
or Outlook.View
, which were my first guesses)
So far I have this:
Sub MoveToTop(newFolderName as String)
Dim nsp As Outlook.NameSpace
Dim newFolder As Outlook.Folder
Dim rootFolder as Outlook.Folder
Set nsp = Application.GetNamespace("MAPI")
Set rootFolder = ns.GetDefaultFolder(olFolderInbox)
Set newFolder = rootFolder.Items.Find (newFolderName)
'now I need something like:
newFolder.MoveUp
End Sub
I am missing the link between the view in the navigation pane and the folders in the MAPI namespace
Thanks a lot,
Bjoern