title: Outlook 2010 Force Update UI after MailItem.MarkAsTask
body: <p>I have a script that runs when I receive an email with a certain subject.
  At the end of the script I want to mark the MailItem as complete and have it <strong>show the checkmark next to the email.</strong> </p>
  
  <p>I call <em>MarkAsTask olMarkComplete</em> which does what it's supposed to but the UI doesn't update and the checkmark doesn't appear unless I select/deselect the email through the UI</p>
  
  <p>Edit: When I loop through all emails in my folder it only works on the last one set. Am I missing something here..?</p>
  
  <p>My code so far:</p>
  
  <pre><code>Dim reviewFolder As Folder
  Dim item As Outlook.MailItem
  
  Set myFolder = ThisOutlookSession.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders("My Folder")
  
  For Each item In myFolder.Items
      {other code}
      item.MarkAsTask olMarkComplete
  Next
  </code></pre>