Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Disable AddIn via automation

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Disable AddIn via automation

After you open Excel you can uninstall the addins

Public Sub main()
Dim a As AddIn

For Each a In AddIns
If a.Installed Then
a.Installed = False
End If
Next a
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Disable AddIn via automation

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

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Disable AddIn via automation

Hi,
Thanks Kent, I'll try that and I'll keep you in touch.

David.

"Kent Prokopy" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
C# Excel Automation AddIn Help message My interest Excel Programming 0 December 18th 07 07:24 PM
Unshimmed Automation Addin and Shimmed COM Addin in same App Domai Brandon Excel Programming 0 June 27th 06 11:18 PM
Installing Addin via Automation Aragorn[_2_] Excel Programming 6 October 26th 05 10:54 PM
addIn functions in automation nicgendron Excel Programming 1 July 14th 05 10:35 AM
Automation COM Addin with Excel Puneet Excel Programming 0 July 12th 04 07:50 PM


All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"