<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Ok, so i have a code than… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/SAP-Analysis-for-Excel/m-p/62720#M15775</link>
    <description>Ok, so i have a code than can activate or deactivate ComAddin. I have set to see the Excel Instance with Show object, and after checking the COM list, its working. i can disable or enable COM but AddIn is not active among the ribbon panel.
Is something missing? in VBA this kind of approach works. I have added office.dll so i can use Microsoft.Office.Core namespace.
&amp;nbsp;
code below:
Dim wb as Object = GetWorkbook(handle,workbookname)
Dim app as Object = wb.Application
Dim addin As COMAddIn
Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each addin In app.COMAddIns
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If addin.Description = AddInDescr Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;If ActivateCom = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If addin.Connect = False Then addin.Connect = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If addin.Connect = True Then addin.Connect = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If
&amp;nbsp;&amp;nbsp;End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; Next
Success = True
Catch e As Exception
&amp;nbsp;Success = False
&amp;nbsp;Message = e.Message
Finally
&amp;nbsp;wb = Nothing
&amp;nbsp;app = Nothing
End Try</description>
    <pubDate>Tue, 22 May 2018 18:50:00 GMT</pubDate>
    <dc:creator>PavelKrál</dc:creator>
    <dc:date>2018-05-22T18:50:00Z</dc:date>
    <item>
      <title>SAP Analysis for Excel</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SAP-Analysis-for-Excel/m-p/62719#M15774</link>
      <description>Hi,

If i open excel manually, Analyissi tool is active, If i create instance or open Workbook from BP, analysisi is not active... in the com addins its telling me its load at startup and active, but its not.

Any help with this? Same issue is with PowerPivot. How can i change the code so the addins are loaded as well during Instance creation?</description>
      <pubDate>Tue, 22 May 2018 17:22:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SAP-Analysis-for-Excel/m-p/62719#M15774</guid>
      <dc:creator>PavelKrál</dc:creator>
      <dc:date>2018-05-22T17:22:00Z</dc:date>
    </item>
    <item>
      <title>Ok, so i have a code than…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SAP-Analysis-for-Excel/m-p/62720#M15775</link>
      <description>Ok, so i have a code than can activate or deactivate ComAddin. I have set to see the Excel Instance with Show object, and after checking the COM list, its working. i can disable or enable COM but AddIn is not active among the ribbon panel.
Is something missing? in VBA this kind of approach works. I have added office.dll so i can use Microsoft.Office.Core namespace.
&amp;nbsp;
code below:
Dim wb as Object = GetWorkbook(handle,workbookname)
Dim app as Object = wb.Application
Dim addin As COMAddIn
Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each addin In app.COMAddIns
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If addin.Description = AddInDescr Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;If ActivateCom = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If addin.Connect = False Then addin.Connect = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If addin.Connect = True Then addin.Connect = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If
&amp;nbsp;&amp;nbsp;End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; Next
Success = True
Catch e As Exception
&amp;nbsp;Success = False
&amp;nbsp;Message = e.Message
Finally
&amp;nbsp;wb = Nothing
&amp;nbsp;app = Nothing
End Try</description>
      <pubDate>Tue, 22 May 2018 18:50:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SAP-Analysis-for-Excel/m-p/62720#M15775</guid>
      <dc:creator>PavelKrál</dc:creator>
      <dc:date>2018-05-22T18:50:00Z</dc:date>
    </item>
  </channel>
</rss>

