How can I enter a string as a folder location
ex. \MySpecificEmailAddress\Inbox
To select that folder in VBA using outlook?
I obtained the path using:
... = ActiveExplorer.CurrentFolder.FolderPath
I have searched far and wide to automatically tell the script which specific folder to run a macro on without having to select the folder then run the script.
You should be able to enumerate
Session.Storesand thenStore.GetRootFolder.Foldersto access all folders for a given mailbox. Depending on how many levels deep you need to go, this may take a bit more effort (i.e. recursion).Here is a code snippet from MSDN which enumerates all folders under the mailbox/store root folders: