[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4902
  • Last Modified:

Outlook IMAP folders doesn't update Unread message count.

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
snowdog_2112
Asked:
snowdog_2112
  • 5
  • 2
  • 2
  • +2
1 Solution
 
peakpeakCommented:
That is because the default check interval is 30 minutes. Change it in Tools->Options->Configure e-mail->Send and receive (translated)
0
 
snowdog_2112Author Commented:
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
 
Inbox360Commented:
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
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
wackymCommented:
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
 
wackymCommented:
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
 
snowdog_2112Author Commented:
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
 
peakpeakCommented:
Why do you need the unread count? The inbox should ALWAYS be empty, processed ...
0
 
wackymCommented:
@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
 
jlwood949Commented:
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
 
wackymCommented:
@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
 
jlwood949Commented:
@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
 
wackymCommented:
@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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now