1.

Solve : Print a list of Personal Folders in Outlook?

Answer»

Is there a way to print a list of all the Personal Folders/Subfolders you have in Outlook?

Thanks for your help~Not that I know of.  Why not just open Outlook and do a Print-Screen?

Alan <><  Print Directory from the link below...

http://www.karenware.com/powertools/powertools.asp

Kudos to Karen !

patio.  8-)I think the Print Directory UTILITY from KarenWare.com might not work for Outlook's internal folders. Can you locate them via Windows Explorer?  I have not found them.  That's why I'm thinking it may not work.The only way to find out is to try it...i don't use Outlook...never will.

patio.  8-)Thanks very much to all- I did think of a print screen- just looking for an easier way- no- you can't see them in Windows Explorer- tried with a SIMILAR product- FolderScavenger- didn't work- oh well- thanks again for trying to help-
Did you happen to try the program i suggested ? ?

patio.  8-)I did not try it- after reading the description of what the Print Directory utility does (the only thing that looked applicable) it does the same thing as the FolderScavenger I tried- as Soybean said- since you cannot locate the folders within Outlook via Windows Explorer Karen's will not be able to find/print them. Again- thanks for your EFFORTS though- nice to know about Karen's- have a great evening~I'm confused again...it doesn't take much.
Why can't you find the sub-folders in Outlook thru Explorer ? ?
Do you have show hidden files checked ? ?
What directory would you like to print the contents of exactly ? ?

patio.  8-)Maybe I can explain it this way-  you've set up folders within the email program you use to organize it, right? For example, Project X, Project Y, Project Z- the folders you move messages into that you want to keep- can you find these folders in Explorer?I'm sure you can't find them with Explorer.  They are embedded in an "Office Data File" which contains them.  In my system with Win XP installed on partition F, my Outlook files are located at F:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Outlook.  The main file appears to be simply named Outlook.  There's also a file called "mailbox", which is also an "Office Data File" file type.  I also see files named archive and backup there; they are also Office Data Files.

I can't open them from Explorer.  Via a Command Prompt window, I see that full names: Outlook.pst and mailbox.PAB.  Outlook.pst is about 108MB in size; mailbox.PAB, about 265KB.Right- it's basically the .pst file that HOLDS these folders- Windows Explorer can't open a file so that you can see the folders in the file- that's why this program won't work to get a list of these folders!   I knew there was a good reason i don't use Outlook... Quote

I knew there was a good reason i don't use Outlook...

 You can do this with Visual Basic.

The following is a fairly rough-and-ready solution that will create a folder tree for email folders and plonk the results in a new note.  Customise to suit your needs.  You should only run the "ListFolders" procedure.  Give it time to run - it may appear to have hung for a bit if you have a lot of folders.

Code: [Select]Sub ListFolders()

Dim lfApp As Outlook.Application
Dim lfNote As Outlook.NoteItem
Dim lfNameSpace As Outlook.NameSpace
Dim counter As Integer
Dim newline As String

newline = Chr(13)

Set lfApp = CreateObject("Outlook.Application")
Set lfNote = lfApp.CreateItem(olNoteItem)
Set lfNameSpace = lfApp.GetNamespace("MAPI")


'lfNote.Body = "test"

For counter = 1 To lfNameSpace.Folders.count

  lfNote.Body = lfNote.Body + lfNameSpace.Folders.Item(counter).Name + newline
  If lfNameSpace.Folders.Item(counter).Folders.count > 1 Then
    ListSubFolders lfNameSpace.Folders.Item(counter).Folders, lfNote, 1
  End If

Next

' Show note
lfNote.Display


End Sub


Function ListSubFolders(lsFolders As Outlook.Folders, lfNote As Outlook.NoteItem, depth As Integer)

Dim counter As Integer
Dim newline As String

newline = Chr(13)
For counter = 1 To lsFolders.count

  lfNote.Body = lfNote.Body + "|" + String(depth, "-") + lsFolders.Item(counter).Name + newline
 
  If lsFolders.Item(counter).Folders.count > 1 Then
  
    ListSubFolders lsFolders.Item(counter).Folders, lfNote, depth + 1
  
  End If

Next


End Function
Gives output like:
Mailbox - Rob Pomeroy
|-Deleted Items
|-Inbox
|--Person1
|--Person2
|-Outbox
|-Sent Items
|-AVG Virus Vault
|-Calendar
|-Contacts
|-Drafts
|-Journal
|-Junk E-mail
|-Notes
|-Sync Issues
|--Conflicts
|--Local Failures
|--Server Failures
|-Tasks
Public Folders
|-Favorites
|-All Public Folders
|--Accounts Group Archive
|--Person3 Archive
|---Customers
|----Customer1
...


Discussion

No Comment Found