2 Go to Developer's tab > click on "Visual Basic" button or hit Alt + F11.
3 Go to Insert tab > click on "Module" or hit M.
4 Copy the VBA code from below.
5 Paste the code in the newly created module.
6 Go to Run tab > click on "Run Sub/UserForm" or hit F5.
7 That's it!
Advertisement
Code
'==========================================
' Mark Inbox Messages As Unread
'==========================================
Sub markInboxMessagesAsUnread()
' Set variables
Dim ns As Outlook.NameSpace
Dim inbox As Outlook.MAPIFolder
Dim item As Outlook.MailItem
' Set namespace
Set ns = Application.GetNamespace("MAPI")
' Get inbox folder
Set inbox = ns.GetDefaultFolder(olFolderInbox)
' Loop through all mail items
For Each item In inbox.Items
' Mark as unread
item.UnRead = True
Next item
End Sub