LouisH LouisH - 28 days ago 6
C# Question

Creating a VSTO Add in for multible applications

Is it possible to create an VSTO add in for multible office applications?

Can I outsource the functions i want to have for every application and then create an Add-in for every application? If yes, is there a better way to achieve this?

Answer

I recommend making a solution with an add-in project for each Office application.

Then add a class library project to the solution and reference that from each of the add-on projects.

That way you can centralize code used in all add-ins.

If you need to interact with the active application or document, you can detect the type of the calling object and typecast it to the relevant application/document type.