title: Save Outlook Mailitem to local folder
body: <p>The following code does everything I want: pulls email, saves attachments, extracts files
  EXCEPT save the original email to the folder fDest.  I seem unable to see the solution.</p>
  <p>This seems to be the problematic line as it won't save the email:
  &quot;mi.SaveAs fDest2, olMSG&quot;</p>
  <pre><code>Sub SaveAttachments()
      Dim ol As Outlook.Application
      Dim ns As Outlook.Namespace
      Dim fol As Outlook.Folder
      Dim i As Object
      Dim mi As Outlook.MailItem
      Dim at As Outlook.Attachment
      Dim Inbox As MAPIFolder
      Dim strDate As String
      Dim oApp As Object
      Dim fDest As Variant
      Dim j As Variant
      Dim sh As String
      Dim FileDialog As FileDialog
      Dim Tracker As Workbook
      Dim fSheet As Sheets
      Dim LastRow As Long
      Dim strFilePath
      Dim fTracker As Workbook
                 
      strDate = InputBox(&quot;Enter Date in format dd-Mmm-yyyy&quot;, &quot;User Date&quot;, Format(Now(), &quot;dd-Mmm-yyyy&quot;))
      strFilePath = &quot;\\namdfs\CARDS\MWD\GROUPS\GCM_NAM\2021\05 May\&quot;
      fTrackerName = &quot;Inquiry.Tracker.SWPA.Violations.May.2021.xlsx&quot; '
  
      On Error Resume Next
          Set fTracker = Workbooks(fTrackerName)
          'If Err Then Set fTracker = Workbooks.Open(strFilePath &amp; fTrackerName)
      On Error GoTo 0
          'Windows(fTrackerName).Activate
        
      Set ol = New Outlook.Application
      Set ns = ol.GetNamespace(&quot;MAPI&quot;)
      Set fol = ns.Folders(&quot;GCMNamLogs&quot;).Folders(&quot;Inbox&quot;)
          
      fDest = &quot;C:\Users\jb76991\Desktop\Violations_Emails\&quot;
      fUser = UCase(Environ(&quot;username&quot;)) &amp; &quot;:&quot; &amp; Chr(10) &amp; Now()
          
      For Each i In fol.Items.Restrict(&quot;@SQL=urn:schemas:httpmail:subject LIKE '%&quot; &amp; strDate &amp; &quot;%'&quot;)
          'Debug.Print fDest &amp; i &amp; &quot;.msg&quot;
          If i.Class = olMail Then
              Set mi = i
              fDest2 = fDest &amp; mi.Subject &amp; &quot;.msg&quot;
              mi.SaveAs fDest2, olMSG
              For Each at In mi.Attachments
                  'do something with attachments but i've commented it out
              Next at
          End If
      Next i
      MsgBox (&quot;Completed&quot;)
      
  End Sub
  </code></pre>
  <p>Can anyone tell me how to save the original emails that are being filtered?</p>