Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Detect read messages count changed

Geek News

Detect read messages count changed
"xhantt" <xhantt[ at ]gmail.com> 2/14/2006 4:06:48 PM
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?

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net