SAP Analysis for Excel
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-05-18 06:22 PM
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?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-05-18 07:50 PM
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.
code below:
Dim wb as Object = GetWorkbook(handle,workbookname)
Dim app as Object = wb.Application
Dim addin As COMAddIn
Try
For Each addin In app.COMAddIns
If addin.Description = AddInDescr Then
If ActivateCom = True
If addin.Connect = False Then addin.Connect = True
Else
If addin.Connect = True Then addin.Connect = False
End If
End If
Next
Success = True
Catch e As Exception
Success = False
Message = e.Message
Finally
wb = Nothing
app = Nothing
End Try
