I receive emails from automated system every 5 min that I don't have to read constantly. Ther's rule that moves these messages ( by subject) to folder "Alerts'.
So they stay there. The only one problem is that every 5 min Notification icon in system tray appear and I still need to see if that is Alert or important email.
I wrote little macro that makes items in 'Alerts' read, but it doesn't help to get rid of Notification icon.
Manually if I switch 'Alerts' folder and go back to Inbox folder, the icon dissapears.
How can make to do within my macro?
I call MakeRead() from New_mail event
Sub MakeRead()
Set myOlApp = ThisOutlookSession
Set myNamespace = myOlApp.GetNamespace("MAPI"
Set myFolder = myNamespace.GetDefaultFolder(olFolderInbox)
Set myNewFolder = myFolder.Folders("Alerts"
Dim lastitem As Integer
'' what item needs to be read
lastitem = myNewFolder.Items.Count
Set MyItem = myNewFolder.Items(lastitem)
' make it Read
MyItem.UnRead = False
End Sub
If do myNewFolder.Display, it opens new outlook. How can do the same without opening new application?
Thanks!
So they stay there. The only one problem is that every 5 min Notification icon in system tray appear and I still need to see if that is Alert or important email.
I wrote little macro that makes items in 'Alerts' read, but it doesn't help to get rid of Notification icon.
Manually if I switch 'Alerts' folder and go back to Inbox folder, the icon dissapears.
How can make to do within my macro?
I call MakeRead() from New_mail event
Sub MakeRead()
Set myOlApp = ThisOutlookSession
Set myNamespace = myOlApp.GetNamespace("MAPI"
Set myFolder = myNamespace.GetDefaultFolder(olFolderInbox)
Set myNewFolder = myFolder.Folders("Alerts"
Dim lastitem As Integer
'' what item needs to be read
lastitem = myNewFolder.Items.Count
Set MyItem = myNewFolder.Items(lastitem)
' make it Read
MyItem.UnRead = False
End Sub
If do myNewFolder.Display, it opens new outlook. How can do the same without opening new application?
Thanks!