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.
link - https://msdn.microsoft.com/en-us/library/office/aa209386(v=office.11).aspx
Extensibility Wizard
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 project has been removed in Visual Studio 2012
This project is still available in Visual Studio 2010 and 2008 under (Other Project Types > Extensibility)
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.
![]() |
![]() |
![]() |
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
RegAsm.exe
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
RegSrv32.exe
Replaces any registry entries for an unshimmed assembly with the correct ones to load the shim assmebly instead
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.
Problems
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