I have the following structure in my Outlook Public Folders.
-Public Folders --1001_RandomProject --1002_AnotherProject --1003_Yetanotherproject ...
and so on, basically there's a couple of thousand(!) subfolders each corresponding to a project and prefixed with the project number.
Now I'm trying to create a Macro which will allow a user to select a number of mail items, enter the project number through an Inputbox and then move these mail items automatically to the subfolder corresponding to the project number.
All of this works, but in the current implementation I'm looping through all the subfolders of the Public Folders and comparing the entered project number to the first 4 characters of the folder name, to see if they match, and then move the mail items to the folder.
As you can imagine with thousands of subfolders, this tends to go quite slowly. So my question is: is there another way to select the correct folder without looping through all of them (sort of using a mask like 'find me a folder beginning with 1001*).