title: VBScript & Outlook 2010: Cannot save mail item as text file
body: <p>I have an issue with saving an Outlook 2010 email item as a text file using VBScript.  I am beginning to think it is a permissions issue, but the VBScript error message is not very helpful:</p>
  
  <blockquote>
    <p>myscript.vbs(409, 9) (null): Operation aborted</p>
  </blockquote>
  
  <p>Code looks like this:</p>
  
  <pre><code>' create an object to hold a folder item - 
  ' point it to first item
  set olitem = olitems(1)
  if err.number &lt;&gt; 0 then
      stdout.write("Could not create Outlook Item object - exiting" &amp; vbcrlf)
      stdout.write("Err.Number: " &amp; Err.Number &amp; vbcrlf)
      wscript.quit(999)
  end if
  
  
  ' save the mail item to a text file
  olitem.saveas fullpath_src &amp; messagefilename, oltxt
  if err.number &lt;&gt; 0 then
      stdout.write("Could not save email as a text file - exiting" &amp; vbcrlf)
      stdout.write("Err.Number: " &amp; Err.Number &amp; vbcrlf)
      wscript.quit(999)
  end if
  </code></pre>
  
  <p><code>oltxt</code> is defined as a <code>Const</code> of value <code>0</code> - the value for a text file.</p>
  
  <p>I get the same error if I try to process an email's body text under Outlook 2010. Under Outlook 2013 - on a different, non-corporate, machine - the code works fine.</p>
  
  <p>I think I read somewhere that some Outlook 2010 functionality may have been crippled under certain circumstances for security reasons - revolving around the presence/absence of antivirus software.  If this is true, I have been stopped in my tracks - even though I have corporate grade AV protection.</p>