Programmatically Install VSTO Add-Ins

I have developed several VSTO add-ins for MS Office 2010. I need a way to register them from a C # program.

How can i do this?

+4
source share
2 answers

To this registry key - HKCU \ Software \ Microsoft \ Office \ Word \ Addins add your own RegistryKey with these values: (use the Microsoft.Win32.RegistryKey class) Description (string) FriendlyName (string) Manifest (string) LoadBehavior (DWORD)

The manifest is the absolute path to your VSTO addin + "| vstolocal" (for example: C: /myaddin.vsto | vstolocal)

LoadBehavior must be 3 - means: load at startup

Friendly name and description will be displayed in Word

But before starting your add-on for the first time, you must run your .vsto file (note that Visual Studio Tools for Office must be installed)

Process.Start("C:/myaddin.vsto"); 
+3
source

Source: https://habr.com/ru/post/1345705/


All Articles