title: 80040154 Class not registered ERROR in Outlook 2010 Add In
body: <p>I am using Visual Studio 2010 to create a Outlook 2010 Add In. I try to create a new Outlook AppointmentItem to work with thinking that I can add it to the calendar eventually.</p>
  
  <pre><code>Microsoft.Office.Interop.Outlook.AppointmentItem tempApp = new Microsoft.Office.Interop.Outlook.AppointmentItem();
  </code></pre>
  
  <p>But when the AddIn runs and trys to create the AppointmentItem object, I get this error on the line above.</p>
  
  <pre><code>System.Runtime.InteropServices.COMException was unhandled by user code
        Message=Retrieving the COM class factory for component with CLSID {00061030-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
        Source=mscorlib
        ErrorCode=-2147221164
  </code></pre>
  
  <p>What can I do to "register the class"? I'm guessing it has to do with Microsoft.Office.Interop.Outlook.dll in some way.</p>