Hi blinkyjesus,
If you want to expand all folders in Outlook, you can try to use the VBA code to get your result.
Private Sub Application_Startup()
ExpandAllFolders
End Sub
Private Sub ExpandAllFolders()
On Error Resume Next
Dim Ns As Outlook.NameSpace
Dim Folders As Outlook.Folders
Dim CurrF As Outlook.MAPIFolder
Dim F As Outlook.MAPIFolder
Dim ExpandDefaultStoreOnly As Boolean
ExpandDefaultStoreOnly = True
Set Ns = Application.GetNamespace("Mapi")
Set CurrF = Application.ActiveExplorer.CurrentFolder
If ExpandDefaultStoreOnly = True Then
Set F = Ns.GetDefaultFolder(olFolderInbox)
Set F = F.Parent
Set Folders = F.Folders
LoopFolders Folders, True
Else
LoopFolders Ns.Folders, True
End If
DoEvents
Set Application.ActiveExplorer.CurrentFolder = CurrF
End Sub
Private Sub LoopFolders(Folders As Outlook.Folders, _
ByVal bRecursive As Boolean _
)
Dim F As Outlook.MAPIFolder
For Each F In Folders
Set Application.ActiveExplorer.CurrentFolder = F
DoEvents
If bRecursive Then
If F.Folders.Count Then
LoopFolders F.Folders, bRecursive
End If
End If
Next
End Sub
Please try this VBA code and check if it works for you, to get more information please refer to this article:
http://www.msoutlook.info/question/595
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Hope it's helpful.
Regards,
Emi Zhang
TechNet Community Su