Check for the senderEmailAddress

Dim obj as a generic Object – there are objects other than MailItem in your Inbox, also to improve your loop try using Items.Restrict Method (Outlook) Option Explicit Sub SetFlagIcon() Dim mpfInbox As Outlook.Folder Dim obj As Object Dim Items As Outlook.Items Dim i As Long Dim Filter As String Set mpfInbox = Application.GetNamespace(“MAPI”).GetDefaultFolder _ … Read more