title: Redemption: first attempt to SaveAs on sent item fails after trying to get server message-id
body: <p>Following on from <a href="https://stackoverflow.com/questions/42291195/get-messageid-of-a-sent-mail-in-outlook/42303292?noredirect=1#comment88973603_42303292">this thread</a>, I am encountering failures for the <em>first</em> attempt to call <code>SaveAs</code> on an RDOMail object, after using the suggested method in the linked answer to get the server's Message-ID header. I want to get the server message-id because it is the canonical ID (and primary key) for messages for my purposes.</p>
  
  <p>The first attempt to <code>SaveAs</code> using method 1024 gives me a <em>Error in IMessage.GetAttachmentTable: MAPI_E_NOT_FOUND</em>, but if I reattempt the save (that is, run all the code in the saving method again), it succeeds with the save and I can see that it has successfully retrieved the server message-id.</p>
  
  <p>I have tried using 1030 and 1031 for SaveAs and these behave the same (fail first time, then succeed), with 1030 returning a slightly different error: <em>IConverterSession.MAPIToMIMEStm: MAPI_E_NOT_FOUND</em> (1031 returns same error as 1024).</p>
  
  <p>I have a global field in <code>ThisAddin</code> for the Redemption session:</p>
  
  <pre><code>Public Shared rSession As Object
  </code></pre>
  
  <p>And I assign it in <code>ThisAddin.Startup</code> using RedemptionLoader:</p>
  
  <pre><code>rSession = Redemption.RedemptionLoader.new_RDOSession
  rSession.MAPIOBJECT = Globals.ThisAddIn.Application.Session.MAPIOBJECT
  </code></pre>
  
  <p>Then in my class that manages the saving of emails, I use the suggested method like this:</p>
  
  <pre><code>Dim rdoMailItem As Object
  Dim MAPI_NO_CACHE = &amp;H209
  Dim MAPI_BEST_ACCESS = &amp;H10
  Try
      rdoMailItem = ThisAddIn.rSession.GetMessageFromID(someEntryId, , MAPI_BEST_ACCESS + MAPI_NO_CACHE)
      Dim dummyString = rdoMailItem.Fields("http://schemas.microsoft.com/mapi/proptag/0x1035001F")
      rdoMailItem.SaveAs(someFilePath, 1024)
  Catch ex as Exception
      Debug.Print(ex.Message)
  End Try
  </code></pre>
  
  <p>If I omit the further arguments from the <code>GetMessageFromID</code> method, and don't try to get the property using <code>.Fields(...)</code>, I don't get the errors and <code>SaveAs</code> works first time (but of course, that doesn't give me the server message-id). So this behaviour appears to arise from the special options and field retrieval.</p>
  
  <p>This is using Redemption version 5.15.0.4892; same behaviour for 5.11.0.4476 which I had handy. Outlook 2010, connected to an Office365 exchange account.</p>