title: how to save the outlook instant search result emails in hard drive folder
body: <p>I am trying to save all the emails, resulting out of instant text search into the hard drive folder. the below code is able to perform the search but giving me an error at selectallitems line while selecting each mail and saving them in HD. code is in excel vba;</p>
  
  <pre><code>Dim OlApp As Outlook.Application
  Set OlApp = CreateObject("Outlook.Application")
  
  
  Dim fldrpath As String
  fldrpath = "\\mydata\EMAILS\
  
  Check subfolder for messages and exit of none found
  txtsearch = "abc@xyz.com, received:4/1/2017..4/30/2017"
  OlApp.ActiveExplorer.Search txtsearch, olSearchScopeAllFolders
  
  Dim myitem As Outlook.MailItem
  Dim objitem As Object
  Set myitem = OlApp.ActiveExplorer.SelectAllItems
  Set objitem = myitem
  objitem.SaveAs fldrpath &amp; "test" &amp; ".msg", olMSG
  </code></pre>
  
  <p>Any other alternative code to get the emails saved will also be appreciated.
  Thanks in advance !! looking for a quick solution</p>