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?
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?