title: python win32com save archived outlook email
body: <p>This is the code I run</p>
  
  <pre><code>import win32com.client import re
  
  outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
  
  for account in outlook.Folders:
      if (account.Name == "account@domain.com"):
          my_account = account
          break
  
  for f in my_account.Folders:
      if f.Name == "Inbox":
          read_folder = f
          break
  
  all_emails = read_folder.Items
  email = all_emails[0]
  email.SaveAs("C:/tmp/email.msg")
  </code></pre>
  
  <p>The last line throws an error if the message has <a href="https://i.stack.imgur.com/vuMxi.png" rel="nofollow noreferrer">this icon</a>
  I assume this icon means it has been archived? This is the error I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\anaconda3\envs\test\lib\site-packages\IPython\core\interactiveshell.py", line 2963, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File "&lt;ipython-input-26-bd0a4750f7e3&gt;", line 1, in &lt;module&gt;
      email.SaveAs("C:/tmp/email2.msg")
    File "&lt;COMObject &lt;unknown&gt;&gt;", line 3, in SaveAs
  pywintypes.com_error: (-2147467260, 'Operation aborted', None, None)
  </code></pre>