Monitor Folders recursively

W

Wes Stahler

I can monitor specific Outlook folders via the AddItem event.

Private WithEvents objProjectItems As Items

Private Sub Application_Startup()
Dim objNS As NameSpace
Set objNS = Application.GetNamespace("MAPI")
Set objProjectItems = objNS.GetDefaultFolder
(olFolderInbox).Folders.Item("Projects").Items
Set objNS = Nothing
End Sub

Private Sub Application_Quit()
Set objProjectItems = Nothing
End Sub

Private Sub objProjectItems_ItemAdd(ByVal Item As Object)
MsgBox "You added an item to the Projects Folder", vbOKOnly
End Sub

Now I need to do this recursively any suggestions?
 
B

Brian Tillman [MVP - Outlook]

I can monitor specific Outlook folders via the AddItem event.

Programming questions should be asked in one of the programming groups, like
microsoft.public.outlook.program_vba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top