Outlook Folder List

For the previous hack, I often had a hard time finding the correct folder to monitor. This bit of code will list all the top level folders for you.

' Copyright under GPL by Mark Grimes
' list folders by poping up msg box windows
Private Sub ListFolders()
    Dim objNS As NameSpace
    Dim objFolders, objFolder
    Set objNS = Application.GetNamespace("MAPI")

    ' instantiate Items collections for folders we want to monitor
    Set objFolders = objNS.Folders
    For Each objFolder In objFolders
        MsgBox objFolder.Name
    Next
    Set objNS = Nothing
End Sub

Published

July 25, 2005 8:36AM

License

The contents of this blog are licensed under the Creative Commons “Attribution-Noncommercial-Share Alike 3.0″ license.