Remove an addin from the Word list of Addins

B

Bob

How do I disable/uncheck an addin (but not remove) from the Word Addins list
programmatically? When I this vba code, I get "The requested member of the
collection doesn't exist," but the addin does exist and is spelled correctly:

AddIns("MyCOMAddin").Installed = False
 
G

Greg Maxey

(WARNING! WARNING! WARNING!)

Bob,

I don't know :-(. I have a few template addins loaed and I ran:

Sub ScratchMacro
For Each oAddIn in Application.AddIns
If oAddIn.Name = "QuickMark.dot Then
oAddIn.Installed = False
End If
Next
End Sub

Which worked. I then simply ran:

Sub ScratchMacro
Application.AddIns("QuickMark.dot")..Installed = False
End Sub

which also worked.

Then I noticed that your Addin was Named MyComAddin and so I thought I would
try this:

Sub ScratchMacro()
Dim oAddIn As COMAddIn
For Each oAddIn In Application.COMAddIns
oAddIn.Connect = False
Next oAddIn
End Sub

Then all hell broke loose. The first indication of trouble failure was a
warning from the Windows security center that my PC was no longer protected
by a fire wall. I decided to close Word and reboot the PC. When I did the
PC failed to boot with a message Windows could not start because the
following file is missing or corrupt: Windows\system32\Config\System.

I have just spent the last four hours restoring my PC :-(. I don't know if
my little macro is the culprit, but I am certainly not running it again to
find out!!

Good luck.
 
J

Janine

Greg, you should have gone to the MVP summit (why are you not there!). It
could have been more productive!
 

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