Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to make Notification icon go or select folder in Outlook in UI

Status
Not open for further replies.

AllyPen

Programmer
Aug 9, 2001
36
0
0
US
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top