0

I'm new to creating office add-ins and I already have a Task Pane Office add-in created for Word using Yeoman generator and using Angular Framework. can it be updated to support Excel also? After going through manifest.xml Document is the only host. So, Do we need to create another project for creating an excel add-in which will have the same features as the word add-in or can the same word add-in be modified to support Excel also?

I have tried changing the Host in Manifest and changing config to support Excel in the current Word Add-in but What would be the best possible method to support both Word And Excel simultaneously?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45

1 Answers1

2

Office Web add-ins (as well as COM add-ins) support creating multi-host add-ins. That means your add-in can be loaded by different Office applications. For that you need to make changes in the manifest file to declare the supported hosts and at runtime check the host to use the right methods and properties according to the host running your add-in.

The yeoman generator doesn't scaffold multi-host add-ins, you need to make the required adjustments manually if you want to support multiple applications by the same codebase.

Which way is to choose, create separate add-ins or go with a single one, depends on your needs. Both approaches are valid.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Thanks for answering it. I tried the approach and was working on other office applications. Getting the manifest certified on Microsoft Partner Center won't be an issue for multiple hosts right? – suyash muley Nov 24 '22 at 10:17
  • This is a supported feature of Office web add-ins, not a hack. Just not widely spread used. – Eugene Astafiev Nov 24 '22 at 10:36