How to Auto Mark Unread Emails Older than Specific Days as Read in Outlook

In general, the old unread mails are virtually unimportant and are those that you opt to ignore. You don’t want to see them keeping unread. Thus, this post will teach you to let Outlook auto mark the unread emails older than specific days as read.

It can be frustrating and annoying to keep seeing unread emails in your mailbox. Moreover, since the important emails must have been read, the remaining unread emails are actually insignificant. Hence, you must be reluctant to being reminded of these old unimportant unread emails. In this case, it will be better if Outlook is able to auto mark the unread emails older than specific days as read. Now, we’ll share such a means with you.

Auto Mark Unread Emails Older than Specific Days as Read in Outlook

Auto Mark Unread Emails Older than Specific Days as Read

  1. At the very outset, launch your Outlook application.
  2. Then, press “Alt + F11” key buttons in the main Outlook window, which will bring you to Outlook VBA editor.
  3. Thus, in the new “Microsoft Visual Basic for Applications” window, you have to find and open the “ThisOutlookSession” project.
  4. Subsequently, copy and paste the following VBA code into this project.
'Run the macro on Outlook startup
Private Sub Application_Startup()
    Call MarkOldUnreadEmailsAsRead
End Sub

Private Sub MarkOldUnreadEmailsAsRead()
    Dim objInboxFolder As Outlook.Folder
 
    'Get the inbox folder
    Set objInboxFolder = Application.Session.GetDefaultFolder(olFolderInbox)
    Call Processfolders(objInboxFolder)
End Sub

Private Sub Processfolders(ByVal objCurrentFolder As Outlook.Folder)
    Dim objItems As Outlook.Items
    Dim i As Long
    Dim objSubfolder As Outlook.Folder
 
    Set objItems = objCurrentFolder.Items
 
    For i = objItems.count To 1 Step -1
        'Find unread emails older than 7 days
        If DateDiff("d", objItems(i).ReceivedTime, Now) >= 7 Then
           If objItems(i).Unread = True Then
              objItems(i).Unread = False
              objItems(i).Save
           End If
        End If
    Next
 
    'Process all Inbox subfolders recursively
    If objCurrentFolder.Folders.count > 0 Then
       For Each objSubfolder In objCurrentFolder.Folders
           Call Processfolders(objSubfolder)
       Next
    End If
End Sub

VBA Code - Auto Mark Unread Emails Older than Specific Days as Read

  1. After that, you ought to sign this macro.
  • Click the “Tools” button in the ribbon and choose “Digital Signature”.
  • In the displaying dialog box, you can follow the onscreen instructions to assign a digital certificate to the current macro.
  1. Later, exit the current window.
  2. Then, you ought to head to “Trust Center Settings” in “Outlook Options” to change macro settings to enable digitally signed macro.
  3. From now on, every time when you launch Outlook, Outlook will auto check if there are unread emails that are older than the predefined days. If there are such emails, Outlook will mark them as read at once.

Essential Precautions to Avert Outlook Data Loss

Regular users of Outlook must have known the necessity of remaining prepared for various Outlook issues, including frequent error messages, abrupt being stuck, and serious corruption and so on. Thus, under this circumstance, it is necessary to take some precautions to avoid painful data loss, such as regular data backup, getting hold of a powerful Outlook recovery tool, like DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover mdf and outlook repair software products. For more information visit www.datanumen.com

Comments are closed.