Shared Add-ins

COM add-ins provide a way to extend the core functionality of an application so that new functionality can be made available.
COM Add-in functions cannot be directly called from cell formulas in worksheets.
All COM add-ins must implement the IDTExtensibility2 interface.


COM add-ins can be accessed via the Application.COMAddins collection
The COMAddins object exposes 4 properties and 2 methods
Count property
Item method - to return a specific object
Update method - to refresh the collection from the registry


Puts entries in the registry so that Office will load the .NET runtime engine mscoree.dll followed by the managed extension assembly
Utilities > regasm.exe


Replaces any registry entries for an unshimmed assembly with the correct ones to load the shim assmebly instead

COM Shared Add-in

Visual Studio 2002 introduced a Shared Add-in wizard to provide an extensibility project type to make it easier to build COM add-ins for office applications.
This model is loosely coupled meaning it can be loaded into multiple hosts.
The host can be determined at run-time in the OnConnection method.
If you have any add-ins created from the Shared Add-in project you should consider migrating them across to VSTO add-ins.

msdn - aa165206
msdn - aa140200
msdn - aa159894

This project has been removed in Visual Studio 2012
This project is still available in Visual Studio 2010 and 2008 under (Other Project Types > Extensibility)

Any add-in that has been written (or uses) .NET managed code could be described as a Managed add-in.

Also called the Shared Addin Template or .NET Shared Addin Wizard
This template provides a skeleton of code with common functionality
Simpler deployment than a VSTO add-in.

Lets you easily specify if the add-in was available to all users of a computer or just the person who installed it.
Lets you easily specify if the add-in was automatically loaded when the host application was opened.


They offer no run-time isolation so one unstable add-in will affect all add-ins deployed in a similar way
They cannot be deployed remotely or updated automatically
They don't have a strict security model

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