Disable AddIn via automation

D

daboul

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.
 
A

Alan Moseley

Can you not disable each of the addins via the registry? Look in HKLM /
Software / Microsoft / Office / Excel / Addins. Change each addins
LoadBehavior to 0. Also look in HKCU / Software / Microsoft / Office / Excel
/ Addins and do the same.

Needless to say, make sure you have a backup etc. etc. before you start.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top