title: How to open the folder of current open item and select that item?
body: <p>I have a Sub that opens the Folder for the current open mail-item.</p>
  
  <p>This makes sense if I have an item open, but have changed the mail-Folder inbetween, and want to open the right Folder straight away again.</p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub ordner_mail_oeffnen()
      On Error GoTo exit_sub
      'Dim olApp As Outlook.Application
      Dim olitem As Outlook.mailitem
      'Set olApp = Outlook.Application
      Set olitem = Outlook.Application.ActiveInspector.CurrentItem
  
      Dim olfolder As MAPIFolder
      Dim FolderPath As String
      Dim Subfolder As Outlook.MAPIFolder
      FolderPath = GetPath(olitem)
      Set olfolder = GetFolder(FolderPath)
      olfolder.Display
  
      'those two lines are just for test purpose
      MsgBox "jetzt"
      Application.ActiveExplorer.ClearSelection
  
      Sleep (10000)
      Application.ActiveExplorer.ClearSelection
      'here comes the runtime-error (I try to translate) "-2147467259 (80004005) element can not be activated or deactivated, as id does not exist in the current view"
      Application.ActiveExplorer.AddToSelection olitem 
  exit_sub:
  exit_sub:
  End Sub
  </code></pre>
  
  <p>Only after the error the new Folder is opened but does not select certain mail.</p>