Solved

Outlook IMAP folders doesn't update Unread message count.

Posted on 2008-06-09
14
4,639 Views
Last Modified: 2011-10-19
I have Outlook 2003 with an Exchange account and an IMAP account defined.  When a new message arrives in the IMAP Inbox, the unread message count does not increment and the Inbox label does not change to bold.  The Exchange Inbox functions as expected.

I have to manually check the IMAP inbox to see if new messages arrived.

Thoughts?  Suggestions?  Thanks.
0
Comment
Question by:snowdog_2112
  • 5
  • 2
  • 2
  • +2
14 Comments
 
LVL 28

Expert Comment

by:peakpeak
ID: 21752157
That is because the default check interval is 30 minutes. Change it in Tools->Options->Configure e-mail->Send and receive (translated)
0
 

Author Comment

by:snowdog_2112
ID: 21752646
The Send/Rcv was already set at 5 minutes.

Let me clarify.  I am receivng mail in the IMAP folder.  New messages are coming in to the Inbox.  I can see them as new messages (i.e., they are bolded in the Inbox).  But when the messages come in, the unread message count does not increment on the Inbox folder on the left navigation bar.

Again, the mail comes in and shows as new mail in the Inbox, but the Inbox folder does not change appearance, so I have to manually expand the Inbox in the IMAP folders to see if there really is any new mail.  This is inconvenient since I leave the Exchange Inbox open to watch new mail from the Exchange server.

Thanks.
0
 

Expert Comment

by:Inbox360
ID: 24658600
i have the same problem, any answer?  all my folder under inbox do not show a new blue number count when there is mail moved into them when using imap with gmail in outlook 2003
0
 
LVL 2

Accepted Solution

by:
wackym earned 0 total points
ID: 25344629
A solution/hack to this problem:
Replace "Inbox at somewhere@somplace.com" with whatever is the name of the imap inbox folder (oh, and the folder must be in Favorites group...or you'll have to change the macro to compensate).
Copy macro to new project in "ThisOutlookSession". Sign it with certificate. You can create certificate with selfcert.exe application which you should find in C:\Program Files\Microsoft Office\Office12 or similar. After that, restart Outlook, accept created certificate as trusted and the macro should run on every send/recieve.

' Macro

Dim objNavFolder As NavigationFolder

Public WithEvents folderItems As Outlook.Items
 

Private Sub Application_Quit()

    Set objNavFolder = Nothing

    Set myOlItems = Nothing

End Sub
 

Private Sub Application_Startup()
 

    Dim objNamespace As NameSpace

    Dim objFolder As Folder

    

    Dim objPane As NavigationPane

    Dim objModule As MailModule

    Dim objGroup As NavigationGroup
 

    On Error GoTo ErrRoutine
 

    Set objPane = Application.ActiveExplorer.NavigationPane

    Set objModule = objPane.Modules.GetNavigationModule(olModuleMail)

    Set objGroup = objModule.NavigationGroups.GetDefaultNavigationGroup(olFavoriteFoldersGroup)
 

    ' replace "Inbox at somewhere@somplace.com" with proper folder

    Set objNavFolder = objGroup.NavigationFolders.Item("Inbox at somewhere@somplace.com")
 

    Set folderItems = objNavFolder.Folder.Items

    

    objNavFolder.Folder.ShowItemCount = olShowUnreadItemCount

    

EndRoutine:

    On Error GoTo 0

    Set objFolder = Nothing

    Set objGroup = Nothing

    Set objModule = Nothing

    Set objPane = Nothing

    Set objNamespace = Nothing

    Exit Sub
 

ErrRoutine:

    MsgBox Err.Number & " - " & Err.Description, vbOKOnly Or vbCritical, "CreateImportantFavoritesFolder"

End Sub
 

Private Sub folderItems_ItemAdd(ByVal Item As Object)

    If objNavFolder <> Nothing Then

        objNavFolder.Folder.ShowItemCount = olShowUnreadItemCount

    End If

End Sub

Open in new window

0
 
LVL 2

Expert Comment

by:wackym
ID: 25351198
The question should not be deleted because it adresses an issue that is still present in outlook 2007. My answer offers a fix which I haven't found anywhere else. I don't need any points for it but I do think it's a valuable resource.

Thank you.
0
 

Author Comment

by:snowdog_2112
ID: 25360368
For the record...I did not try this solution, nor did I accept the solution as the correct answer.  I'm not sure how it got accepted as the answer.
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 28

Expert Comment

by:peakpeak
ID: 25360386
Why do you need the unread count? The inbox should ALWAYS be empty, processed ...
0
 
LVL 2

Expert Comment

by:wackym
ID: 25361183
@peakpeak
If you have more than one email account...which in these days is quite common. Unread count is needed so you don't have to manually check every folder if new mail arrived. For POP acounts it's no problem but for IMAP accounts Outlook neglects to refresh the status (unread count) of the folder, hence the hack.
0
 

Expert Comment

by:jlwood949
ID: 25430867
WackyM,

What library does the type NavigationFolder come from?  On my system, that is throwing a "user defined type not defined" error when I compile it.
0
 
LVL 2

Expert Comment

by:wackym
ID: 25433109
@jlwood949
Where are you compiling it? it's a VBA macro specifically for Outlook... NavigationFolder comes from Namespace: Microsoft.Office.Interop.Outlook    Assembly: Microsoft.Office.Interop.Outlook (in microsoft.office.interop.outlook.dll)

Btw, I made a little mistake in code
line 46:     If objNavFolder <> Nothing Then     should be      If objNavFolder <> Null Then

Maybe that's the cause of your problem.

Greets.
0
 

Expert Comment

by:jlwood949
ID: 25436316
@WackyM
When I start Outlook, I get this error as well when it tried to compile the macro to run it.  I was just uding the Debug menu item Compile Project1 to reproduce the error and try and troubleshoot.  I'm not finding this type in my Office11.  The only type that I even see in mine which contains the word Navigation is the olNavigationPane which is part of olPane.  I say this because I noticed in your text in the accepted answer you used Office12 as an example.  Could it be that the type is different in Office11 to which is what the original question was in reference?

I attached a screenshot so you can see where I'm compiling it.. and the structure in VBA.
NavigationFolderError.jpg
0
 
LVL 2

Expert Comment

by:wackym
ID: 25437752
@jlwood949
Yes, the upper code seems to only work for office 2007. Try the code bellow. It should work for you. :)
Dim objNavFolder As Outlook.MAPIFolder

Public WithEvents folderItems As Outlook.Items
 

Private Sub Application_Quit()

    Set objNavFolder = Nothing

End Sub
 

Private Sub Application_Startup()

    On Error GoTo ErrRoutine

    

    Set objNavFolder = Application.ActiveExplorer.Session.Folders.Item("imap.gmail.com").Folders.Item("BB Alerts")

    

    If objNavFolder <> Null Then

        objNavFolder.ShowItemCount = olShowUnreadItemCount

    End If

    

    Exit Sub
 

ErrRoutine:

    MsgBox Err.Number & " - " & Err.Description, vbOKOnly Or vbCritical, "Error"

End Sub
 

Private Sub folderItems_ItemAdd(ByVal Item As Object)

    On Error GoTo ErrRoutine

    If objNavFolder <> Null Then

        objNavFolder.ShowItemCount = olShowUnreadItemCount

    End If

End Sub

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now