Solved

Outlook IMAP folders doesn't update Unread message count.

Posted on 2008-06-09
14
4,676 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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
 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
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…

856 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