Is there a way to detect when a message has been read from a folder.
I try this
Dim ol As Outlook.Application Dim ns As Outlook.NameSpace Dim WithEvents folders As Outlook.folders
Private Sub Command1_Click() Set ol = New Outlook.Application Set ns = ol.GetNamespace("MAPI") Set folders = ns.GetDefaultFolder(olFolderInbox).folders End Sub
Private Sub folders_FolderChange(ByVal Folder As Outlook.MAPIFolder) unread = Folder.UnReadItemCount End Sub
It work fine with messages inside subfolders of Inbox, but not with the messages from Inbox.
Also there's a way to detect which change triggered the event?
|
|