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.
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.
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
- 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.
- Under “Developer” tab, you need to click on “Visual Basic” button.
- Then in the new window, double click on “ThisOutlookSession” project.
- 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.
- Eventually click “File” > “Save VbaProjectOTM”.
Step 2: Sign This Code
- At first, go to “Start Menu” and type “vba” in the search box.
- Click on “Digital Certificate for VBA Projects”.
- Then in the new dialog, type a certificate’s name, like “Shirley” and hit “OK”.
- Now back to “Visual Basic” window and access to the “ThisOutlookSession” project in Outlook.
- Next click on “Tools” > “Digital Signature”.
- In the subsequent dialog box, click “Choose” button and then pitch on the target certificate.
- Later click two “OK” to enable the signature.
- After that, click the “Save” button in the toolbar.
- Now you can exit the “Visual Basic” window and click on “Macro Settings” on “Developer” tab.
- In “Trust Center”, select “Notifications for digitally signed macros, all other macros disabled”.
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
Leave a Reply