title: Saving Outlook attachments with Python
body: <p>I'm trying to save attachments (the files are NRG raw data files) from outlook emails to my desktop, but am receiving the following error: "AttributeError: &lt;unknown>.SaveAsFile"</p>
  
  <p>Everything works fine (I think) until I try to save the file...</p>
  
  <pre><code>outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
  
  
  
  inbox = outlook.Folders["myinboxfolder"].Folders["Inbox"].Folders["[folder i need]"]
  messages = inbox.Items
  message = messages.GetLast()
  attachment = message.attachments
  
  attachment.SaveAsFile('C:\Users\my name \Desktop\Unsorted' + attachment.FileName)
  </code></pre>
  
  <p>Thank you</p>