List of Folders

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am try, through Access, to retrieve a complete listing of all the contact
folder for an outllok profile. Could someone give me a good nudge in the
right direction. I am new at programming with Outlook so please give as much
detail as possible.

Thank you for the help,

Daniel P
 
Here's a sample for how to loop through all of the folders:

Public Sub LoopFolders(oFolders As Outlook.Folders, _
ByVal bRecursive As Boolean _
)
Dim oFld As Outlook.MapiFolder

For Each oFld In oFolders
If oFld.DefaultItemType = olContactItem Then
' Contact folder
End If

If bRecursive Then
If oFld.Folders.Count Then
LoopFolders oFld.Folders, bRecursive
End If
End If
Next
End Sub

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Fri, 6 Apr 2007 11:34:03 -0700 schrieb Daniel:
 
Nooby question here: I get a 424 (Object Required) message at execute time on
the "For Each oFld In oFolders" line. What might I be doing wrong?
 
Back
Top