title: Search for Outlook Email based on Sender, Subject, and Today's Date
body: <p>I am supposed to receive an email with the subject <code>"Testing Protocol"</code> from <code>"BobSmith@company.com"</code> every day. </p>
  
  <p>Is there a way to search my Outlook Inbox to determine if an email has come through with that subject and that sender for the current day? Id like a simple "Yes" or "No" to be placed in cell A1 of "Control" if it has or has not been received today. </p>
  
  <p>Below is what I have tried to come up with on my own using previous questions with no luck. </p>
  
  <p>Any help is greatly appreciated. <code>EmailSubject = "Testing Protocol"</code></p>
  
  <pre><code>Private Sub Application_Reminder(ByVal Item As Object)
  
  Dim EmailSubject As Range
  Set EmailSubject = Sheets("Control").Range("EmailSubject")
  
  If Item.Class = olTask Then
      If InStr(Item.Subject, EmailSubject) &gt; 0 Then
          ReminderUnreceivedMail
      End If
  End If
  
  End Sub
  
  Sub ReminderUnreceivedMail()
  
  Dim Itms As Items
  Dim srchSender As String
  Dim srchSubject As String
  
  Set Itms = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items
  srchSender = "BobSmith@company.com"
  srchSubject = EmailSubject
  
  Set Itms = Itms.Restrict("[SenderName] = "BobSmith@company.com" And 
  [Subject] = EmailSubject And [SentOn] &gt; '" &amp; Format(Date, "yyyy-mm-dd") &amp; 
  "'")
  
  If Itms.Count = 0 Then
      MsgBox "No " &amp; srchSubject &amp; " email on " &amp; Format(Date, "yyyy-mm-dd")
  End If
  
  Set Itms = Nothing
  
  End Sub
  </code></pre>