Question : How to export public folders to excel

I have a certain folder structure in outlook that I would like to export to excel, or in some way extract it to a file.  They're public folders however, not my personal mailbox, and so they don't show up in the export utility that outlook has.  I don't really care about the emails contained in the folders, only the folders themselves.

I'm running outlook 2003, and the exchange server is 2008.

Answer : How to export public folders to excel

At it's most simplest the following will output the folder names to the immediate window, (ctrl + G) to toggle the window.  Copy from there and paste into the excel sheet.

Chris
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Sub printFolderPath()
Const olPublicFoldersAllPublicFolders = 18
Dim olApp As Object
Dim startFolder As Object
 
    Set olApp = CreateObject("outlook.application")
    Set startFolder = olApp.Session.GetDefaultFolder(olPublicFoldersAllPublicFolders)
    recurse startFolder
End Sub
 
Sub recurse(top As Object)
Dim fldr As Object
    
    Debug.Print top.Name
    For Each fldr In top.Folders
        recurse fldr
    Next
    
End Sub
Random Solutions  
 
programming4us programming4us