title: Outlook VBA Date Time filter
body: <p>I have an outlook macro that reads the all the Subject lines of all unread emails.</p>
  
  <pre><code>Sub ReadMails()
      Set objOutlook = CreateObject("Outlook.Application")
      Set objNamespace = objOutlook.GetNamespace("MAPI")
      Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox)
      Set objFolderSrc = objFolder.Folders("My Own Folder")
  
      Dim Subjects() As String
      ReDim Subjects(1 To 1) As String
  
      Set colItems = objFolderSrc.Items
      Set colFilteredItems = colItems.Restrict("[UnRead] = False")
  
      For Each objMessage In colFilteredItems
          Subjects(UBound(Subjects)) = objMessage.ConversationTopic
          ReDim Preserve Subjects(1 To UBound(Subjects) + 1) As String
      Next
  End Sub
  </code></pre>
  
  <p>Instead I need to read the emails that have come between current time and 8 AM in the morning of the same day. </p>
  
  <p>How do I add that filter</p>