title: Add-ins not loading when opening excel file programmatically
body: <p>I've seen some similar problems described by others before but no real solution. And I'm sure there is one.</p>
  
  <p>I have a .XLA-add in configured to be loaded when I open up Excel. It works fine when I open documents or Excel it self. However, when my BI-system programmatically creates and opens an Excel-file the add-in does not get loaded. The BI-system opens Excel in a new instance so it does not help to have opened Excel on beforehand (and thereby the .XLA-add in)</p>
  
  <p>If i Check Options-Add Ins it looks like the add-in is loaded but it is not!</p>
  
  <p>What I've tried (and that does work) is to insert <a href="https://stackoverflow.com/a/806720/11683">this function</a> into the created excel-file and "reload" the add-ins, but I want to find an automated solution!</p>
  
  <pre class="lang-vb prettyprint-override"><code>Function ReloadXLAddins(TheXLApp As Excel.Application) As Boolean
      Dim CurrAddin As Excel.AddIn
  
      For Each CurrAddin In TheXLApp.AddIns
          If CurrAddin.Installed Then
              CurrAddin.Installed = False
              CurrAddin.Installed = True
          End If
      Next CurrAddin
  End Function
  </code></pre>
  
  <p>Is there any way to load my Add ins automatically when instancing excel programmatically?</p>
  
  <p>Any tips, solutions or workarounds are highly appreciated!</p>
  
  <p>Best regards.</p>