2 Steps to Auto Mark Junk Emails as Read in Outlook

Outlook will show either the number of unread items or the total number of items in “Junk Email” folder.  If you wouldn’t like to see the alert of number and even hope to ignore the junks, why not let Outlook auto mark junk emails as read? This article will offer you a quick method.

Outlook permits us to choose to show either the number of unread items or total number of items for all the mail folders. I prefer to get reminders for the number of unread items. So I’ve set all the mail folders to show number of unread items, like the following screenshot.Show number of unread items

In reality, I don’t desire to receive any reminders about how many junk emails in my mailbox in that these junks are completely useless for me. So every time when new junks land into my mailbox, I have to always right click the folder and choose “Mark all as Read” to disable the number.Mark All as Read

In order to prevent the annoying situation, I come up with a quick way to mark the junk emails as read automatically. Here are the steps to use this method.

Step 1: Copy the VBA Code to ThisOutlookSession Project

  1. At the very outset, start Outlook application and switch to “Developer” tab.

Note: If you cannot find the “Developer” tab, you should firstly enable it. Go to “File” > “Options” > “Customize Ribbon” and then select “Developer” tab.Enable Developer Tab

  1. Under “Developer” tab, you need to click on “Visual Basic” button.
  2. Then in the new window, double click on “ThisOutlookSession” project.
  3. In the subsequent dialog box, you should copy and paste the following codes:
'Auto Mark Junk Emails as Read
Public WithEvents JunkMail As Outlook.Items

Sub Application_Startup()
    Set JunkMail = Session.GetDefaultFolder(olFolderJunk).Items
End Sub

Private Sub JunkMail_ItemAdd(ByVal Item As Object)
    Item.UnRead = False
    Item.Save
End Sub

Note: If you want to auto mark the items in other folders as read, you can replace “(olFolderJunk)”. For example, for Inbox folder, utilize “(olFolderInbox)” instead.Copy and Paste the VBA Codes

  1. Eventually click “File” > “Save VbaProjectOTM”.

Step 2: Sign This Code

  1. At first, go to “Start Menu” and type “vba” in the search box.
  2. Click on “Digital Certificate for VBA Projects”.Digital Certificates for VBA Projects
  3. Then in the new dialog, type a certificate’s name, like “Shirley” and hit “OK”.Create Digital Certificate
  4. Now back to “Visual Basic” window and access to the “ThisOutlookSession” project in Outlook.
  5. Next click on “Tools” > “Digital Signature”.Digital Signature
  6. In the subsequent dialog box, click “Choose” button and then pitch on the target certificate.Assign Digital Signature to the Project
  7. Later click two “OK” to enable the signature.
  8. After that, click the “Save” button in the toolbar.
  9. Now you can exit the “Visual Basic” window and click on “Macro Settings” on “Developer” tab.
  10. In “Trust Center”, select “Notifications for digitally signed macros, all other macros disabled”.Macro Settings

Beware of External Macros

For convenience, many users prefer to use “Enable all macros” option in “Macro Settings”. But actually, it is considerably dangerous. It is hard for common users to identify whether a macro is secure or not. Thus once you are linked to malicious macros, your Outlook data will be infected, corrupt and even lost. In this case, you have to resort to advanced Outlook PST data recovery tool, such as 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 repair SQL Server db error and outlook repair software products. For more information visit www.datanumen.com

4 responses to “2 Steps to Auto Mark Junk Emails as Read in Outlook”

  1. Hi there,

    Thanks for providing a solution for this very annoying situation. However, it doesn’t work for me. I followed all the steps as far as I can tell. The name of the spam folder is spam and located as a subfolder below the Postvak In. Could this be the problem? Also, I have multiple email accounts set up, could that have anything to do with it?

Leave a Reply

Your email address will not be published. Required fields are marked *