title: Why does Attachments.Count return 0 on incoming mail with attachments?
body: <p>I'm trying to save attachments automatically to a local folder using Outlook 2010.</p>
  
  <p>It works when I first create the rule and apply it to all inbox. It doesn't work with incoming mail (no file was saved).</p>
  
  <p>I tried adding some weird code and it fired errors so the script ran.</p>
  
  <pre><code>Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
  
  Dim objAtt As Outlook.Attachment
  Dim saveFolder As String
      saveFolder = "C:\temp"
  Dim dateFormat As String
      dateFormat = Format(itm.ReceivedTime, "yyyy-mm-dd Hmm ")
  For Each objAtt In itm.Attachments
      objAtt.SaveAsFile saveFolder &amp; "\" &amp; dateFormat &amp; objAtt.DisplayName
  Next
  
  End Sub
  </code></pre>
  
  <p>It seems that Outlook doesn't recognize the attachment for incoming mail. I tried adding "MsgBox MyMail.Attachments.Count" and it returned 0.</p>