title: NetOffice - Custom Task Pane in a Appointment window in Outlook
body: <p>I found out that it's possible to add custom task panes to individual windows like e.g. the appointment with this code snippet:</p>
  
  <pre><code>    public void Inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector)
  {
      Microsoft.Office.Tools.CustomTaskPane myCustomTaskPane;
  
      if(Inspector.CurrentItem is  Microsoft.Office.Interop.Outlook.AppointmentItem ) {
  
          UserControl uc1 = MyUserControl();
          myCustomTaskPane = getAddIn().CustomTaskPanes.Add(uc1, "MyPanel",Inspector);
          myCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
          myCustomTaskPane.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;
          myCustomTaskPane.Visible = true;
  
      }
  
      //Additionally You can add a property change listener to the current Item here
  }
  </code></pre>
  
  <p>however, I use 'NetOffice' instead of VSTO to have the add-in compatible with various Outlook versions. And there the add-in doesn't have the <code>CustomTaskPanes</code> property, and the <code>TaskPanes.Add</code> property isn't overloaded to allow adding custom panes on other window than the main explorer.</p>