title: Outlook Interop c# sort items not working
body: <p>I have stumbled upon a problem where the Outlook items table sort method does not give desired results - despite the ascending or descending the method GetLast() always returns the same email item. Code as follows:</p>
  
  <pre><code>Application olApp = new Application();
  NameSpace olNS = olApp.GetNamespace("MAPI");
  MAPIFolder oFolder = olNS.GetDefaultFolder(OlDefaultFolders.olFolderInbox);
  
  Explorer oExp = oFolder.GetExplorer(false);
  //olNS.Logon( false, true);
  
  result = new IOActionResult(null);
  
  oFolder.Items.Sort("[ReceivedTime]");
  
  var subject = oFolder.Items.GetLast().Subject;
  </code></pre>
  
  <p>I have tried specifying following:</p>
  
  <pre><code>oFolder.Items.Sort("[ReceivedTime]", true);
  oFolder.Items.Sort("[ReceivedTime]", false);
  oFolder.Items.Sort("[ReceivedTime]", OlSortOrder.olAscending);
  oFolder.Items.Sort("[ReceivedTime]", OlSortOrder.olDescending);
  </code></pre>
  
  <p>Which did not seem to work either... Any thoughts appreciated!</p>