Addins Collection

Excel
A collection of AddIn objects that represents all the add-ins available to Excel, regardless of whether they're installed.
The AddIns collection includes Excel add-in libraries (XLLs).
Word
A collection of AddIn objects that represents all the add-ins available to Word, regardless of whether or not they are currently loaded.
The AddIns collection includes global templates or Word add-in libraries (WLLs) displayed in the Templates and Add-ins dialog box.

Dim oAddin As Addin 
For Each oAddin In Application.AddIns
   Debug.Print oAddin.Name
   Debug.Print oAddin.Installed
Next

Add Method

Use the Add method to add an add-in to the list of available add-ins.
The Add method adds an add-in to the list but doesn't install the add-in.
Set the Installed property of the add-in to True to install the add-in.

AddIns.Add("MyAmazingAddin.xll") 

Installed Property

To install an add-in that doesn't appear in the list of available add-ins, you must first use the Add method and then set the Installed property.

Dim oAddin As Addin 
oAddin = AddIns.Add("MyAmazingAddin.xll")
oAddin.Installed = True

Title Property

Don't confuse the add-in title, which appears in the Add-Ins dialog box, with the add-in name, which is the file name of the add-in.
You must spell the add-in title exactly as it's spelled in the Add-Ins dialog box, but the capitalization doesn't have to match.

AddIns("analysis toolpak").Installed = True 

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrev