I\'d like to know how I can programatically load and unload a VSTO add-in in Word. I\'m using Word 2007 and VS2010 with C#.
I thought I might have some luck with using t
I had similar requirement and achieved it by little cheat.
I had a addin called AddinLauncher (with no ribbons) which will look for the user type and launch or closes the other addin.
This code was called during AddinLauncher Addin Startup event.
foreach (COMAddIn addin in Globals.ThisAddin.Application.COMAddins)
{
if (**specify your own condition**)
{
addin.Connect = true;
}
}
The following changes are required in your deployment
The Loadbehaviour for AddinLaucher addin is 3 and all the other addins are 0. More about Loadbehaviour here