RE: Disable AddIn via automation



If no addins are loaded at the time this will error unless you add the
following before you uninstall.

If x = 0 Then Exit Sub

"Kent Prokopy" wrote:

When you are done re-install the addins with this:

Dim AddinsList() As String

Public Sub main()
Dim a As AddIn
Dim x As Integer

x = 0
For Each a In AddIns
If a.Installed Then

ReDim Preserve AddinsList(x) As String
AddinsList(x) = a.Title
a.Installed = False
x = x + 1
End If
Next a

If x = 0 Then Exit Sub
For x = 0 To UBound(AddinsList)
AddIns(AddinsList(x)).Installed = True
Next x
End Sub

"daboul" wrote:

Hi,
I run an Excel in Word using the COM automation API:
pApp.CreateInstance(Excel::Application)
My issue is that this Excel instance is using an addin I wrote, which is
fine, but also some others addin that aren't working properly and that are
preventing me from driving the Excel instance.

So, I'd like to be able to run an Excel instance with no addins launched at
all, but still via the COM automation. In fact, I'd like to launch an Excel
exactly as when you type "excel.exe /s" (i.e. in safe mode), so that I'll be
sure that nothing is launched as an addin and preventing me from using Excel.

Does anyone as any idea how I could do that ?

Note that launching "excel.exe /s" isn't good enough because that won't
enable me to drive the Excel via the COM automation API.

Any help or ideas would be greatly appreciated,
David.
Edit/Delete Message
.



Relevant Pages

  • RE: Disable AddIn via automation
    ... "Kent Prokopy" wrote: ... If x = 0 Then Exit Sub ... I run an Excel in Word using the COM automation API: ... My issue is that this Excel instance is using an addin I wrote, ...
    (microsoft.public.excel.programming)
  • Re: How to use automation Add-In to replace Excel macros!!
    ... from the tools menu earlier, when the excel is launched from my application, ... somehow the AddIn functions are not accessible when I launch excel from my ... way to forcibly launch the Add-I? ... "Tom Ogilvy" wrote: ...
    (microsoft.public.excel.programming)
  • Re: cleaning up Windows DLL (made with VB6)
    ... a new session of Excel. ... use as an Automation Addin for Excel, and wanting to use the "Register UDF" ... involves aliasing the UDFs in your addin with functions in a Windows-style ... I can now make Windows DLLs from VB6 (the kind you ...
    (microsoft.public.vb.general.discussion)
  • Re: Macro -->shared.xls --> .xla add-in --> now not in macro list
    ... If I start excel by clicking on the excel icon on my desktop, ... If I start excel by doubleclicking on a .xls file, the addin is loaded. ... all workbooks, including specifically existing workbooks. ...
    (microsoft.public.excel)
  • Re: cleaning up Windows DLL (made with VB6)
    ... use as an Automation Addin for Excel, and wanting to use the "Register UDF" ... Addin". ... to make an ordinary dll with dummy API like functions as part of the process ... I can now make Windows DLLs from VB6 (the kind you ...
    (microsoft.public.vb.general.discussion)