2
votes

I want to develop addins for Office (Outlook,Word and Excel). The code will be almost the same. The difference is only for retrieve a document (mail for Outlook, document for Word,graphic/chart for Excel.

Should I develop 3 addins and therefore I will have 3 installations for my users. Or can I develop only 1 addin and add a condition somewhere?

2
You can restrict yourself to one AddIn. We have written an AddIn that spans Word,Excel,Visio,Outlook,... and we haven't had any problems so far. Although the choice is still up to you.User999999
@User999999 How you do that ? What type of project you selected ?mosflex
Just a standard class librarycontaining modules.User999999
@User999999 I do that. I have three addins and one class library. My addins is only for create button on the ribbon for launch my code. But I have always three addin. I don't understand how you can have only one addin !mosflex
We are using a combination of Reflection and AddinExpress (there probably are free versions for this)User999999

2 Answers

0
votes

Yes, that is possible. You possibly need 3 different AddIn classes, since every platform has it's own format and parameters and you might want to deviate some logic, though there is nothing to stop you integrating the three add-ins in one.

Another option is to make a class library that only uses the general Office assembly, and include that library into your other projects.

For the deployment: you can't use ClickOnce out of the box for that, since ClickOnce only supports a single Office program per installation. You can tweak the installation though, as explained on this article on MSDN: Deploying Multiple Office 2010 Projects in One Package.

0
votes

VSTO doesn't supoport creating multi-host add-ins. The possible ways are:

  1. Develop an add-in which implements IDTExtensibility2 interface without VSTO.
  2. Use third-party tools such as Add-in Express that support creating multi-host add-ins.

Adding multiple AddIn classes to the extisting VSTO based add-ins is not a convinient way to go. At least, you will not be able to debug the code