title: Error accessing COM components
body: <p>I built an add-in for Microsoft Office Word. There isn't an issue using the add-in when Word is ran as Administrator, but when it's not ran as an Administrator, there are two common exceptions accessing Ribbon elements.</p>
  
  <p>The first Exception:</p>
  
  <pre><code>Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.IRibbonUI'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C03A7-0000-0000-C000-000000000046}' failed due to the following error:  could not be found. (Exception from HRESULT: 0x80030002 (STG_E_FILENOTFOUND)).
     at Microsoft.Office.Core.IRibbonUI.InvalidateControl(String ControlID)
  </code></pre>
  
  <p>This error occurs when the Control is invalidated by the following code:</p>
  
  <pre><code>ribbon.InvalidateControl("control-id");
  </code></pre>
  
  <p>And the second Exception:</p>
  
  <pre><code>Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error:  could not be found. (Exception from HRESULT: 0x80030002 (STG_E_FILENOTFOUND)).
     at Microsoft.Office.Interop.Word.ApplicationClass.get_Selection()
  </code></pre>
  
  <p>This error occurs on the last line of the following code:</p>
  
  <pre><code>object wdStory = Word.WdUnits.wdStory;
  object wdMove = Word.WdMovementType.wdMove;
  WrdApp.Selection.EndKey(ref wdStory, ref wdMove)
  </code></pre>
  
  <p>How can I fix this problem?</p>