title: Outlook Add-in for Calendar
body: <p>I'm really new at add-in stuff. My code should do these: 
  An outlook user saves/creates anything. If the created item is an appointment item my system must save it under the c: directory, taking the item subject as file name. Here is my code. What is wrong there? </p>
  
  <p>Note: when I create a new appointment the if clause is working, if I write there any other code, it is working, but I can't get the ai's info, such as <code>ai.Subject</code>.</p>
  
  <pre><code>namespace SendToMRBS
  {
      public partial class ThisAddIn
      {
          private void ThisAddIn_Startup(object sender, System.EventArgs e)
          {
             this.Application.ItemLoad += new Outlook.ApplicationEvents_11_ItemLoadEventHandler(Application_ItemLoad);
      }
  
      void Application_ItemLoad(object Item)
      {
          if (Item is Outlook.AppointmentItem)
          {
              Outlook.AppointmentItem ai = Item as Outlook.AppointmentItem;
              ai.SaveAs("C:\\" + ai.Subject, Microsoft.Office.Interop.Outlook.OlSaveAsType.olICal);
          }
      }
  
  
      private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
      {
      }
  
      #region VSTO generated code
  
      /// &lt;summary&gt;
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// &lt;/summary&gt;
      private void InternalStartup()
      {
          this.Startup += new System.EventHandler(ThisAddIn_Startup);
          this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
      }
  
      #endregion
  
  }
  </code></pre>
  
  <p>}</p>