Option Explicit
Sub MarkEmailsRead()
Dim olApp As Outlook.Application
Set olApp = New Outlook.Application
Dim olNS As Outlook.Namespace
Set olNS = olApp.GetNamespace("MAPI")
Dim olInbox As Outlook.Folder
Set olInbox = olNS.GetDefaultFolder(olFolderInbox)
Dim olItems As Outlook.Items
Set olItems = olInbox.Items.Restrict("[UNREAD]=TRUE")
Dim olItem As Variant
For Each olItem In olItems
If TypeName(olItem) = "MailItem" Then
olItem.UnRead = False
End If
Next olItem
End Sub