title: Get count of messages by received date
body: <p>I have the following code for counting gross number of e-mails in Outlook:</p>
  
  <pre><code>Sub Test()
  
      Dim objOutlook As Object, objnSpace As Object, objFolder As Object
      Dim EmailCount As Integer
  
      Set objOutlook = CreateObject("Outlook.Application")
  
      Set objnSpace = objOutlook.GetNamespace("MAPI")
  
      On Error Resume Next
  
      Set objFolder = objnSpace.Folders("MyFolder").Folders("Spam")
  
      If Err.Number &lt;&gt; 0 Then
          Err.Clear
          MsgBox "No such folder."
          Exit Sub
      End If
  
      EmailCount = objFolder.Items.Count
      Set objFolder = Nothing
      Set objnSpace = Nothing
      Set objOutlook = Nothing
  
      MsgBox "Number of emails in the folder: " &amp; EmailCount, , "Number of spam messages "
  
  End Sub
  </code></pre>
  
  <p><strong>Could someone please give me some way to count for a particular day of the week?</strong></p>
  
  <p>Examples:</p>
  
  <ul>
  <li>"NUMBER OF MESSAGES RECEIVED ON MONDAYS = 476"</li>
  <li>"NUMBER OF MESSAGES RECEIVED ON SUNDAYS = 121"</li>
  </ul>
  
  <p>Or even for a particular date</p>
  
  <ul>
  <li>"NUMBER OF EMAILS RECEIVED ON THE 2nd November 2010"</li>
  </ul>