Tutorial by Examples

How to reference any accessible folder. How to get the full name of a referenced folder. A pair of routines that together will list every folder within every accessible store. A routine to move a folder from one parent folder to another.
A number of the demonstration macros within this part requires a function which I will explain later. For the moment, please just copy GetFldrNames() to a suitable module. I use this function frequently and keep it, and other like it that I use in many different macros, in a module named “ModGloba...
In TestDefaultFldr() I set Fldr to the default Inbox. The constant olFolderInbox can be replaced by other values giving access to any of the default folders. If you type Set Fldr = Session.GetDefaultFolder(, the VB editor will display a drop down list of all the possible values. Sub TestDefaultFl...
TestFldrChain() demonstrates how to reference any folder within any accessible store: Sub TestFldrChain() Dim Fldr As Folder Set Fldr = Session.Folders("A").Folders("A2"). _ Folders("A21").Folders("A213") Debug.Print...
In Part 2, you were shown how to list every accessible store and the top level folders within each store. This involved a loop through the stores and then a loop for each store through its folders Above you have seen how to reference a known folder at any depth within the hierarchy of folders. Thi...
Why do I want to reference a folder? In the next part I will show you how to access emails within a referenced folder. Here I will show you how to move a folder. I created a folder named “Test” within my Inbox. In TestMoveFolder(), I replaced “A” with the name of the store containing my Inbox. ...
How to reference a default folder and the possible limitations of this technique. How to reference any single folder at any depth within any accessible store. How to display the full name of a referenced folder. How to reference one of the many, many available libraries that provide functionali...

Page 1 of 1