Naveed Butt
Naveed Butt

Reputation: 2901

Office-js: How to share the same CustomTab in multiple hosts

We are in the process of creating Office 365 Add-ins.

I was wondering, if there was a way to

  1. use same ribbon menu buttons in different hosts (e.g., Word, Excel and PowerPoint, etc.)
  2. If possible, re-use some of the parts in other hosts (e.g., using same ribbon menu buttons in Word and Excel and using only one button out of various in PowerPoint)

Is this possible, right now?

Upvotes: 2

Views: 333

Answers (1)

Rick Kirkham
Rick Kirkham

Reputation: 9784

Yes. That can be done. Within the VersionOverides section of the add-in manifest, each host (Document, Worksheet, Presentation) has its own Host section where you specify the ribbon/menu buttons. You can point to the same URLs and the same Resources (strings) within each Host section, so you can reuse button images/labels, etc. in multiple hosts. If there are buttons you don't need in PowerPoint, you leave those out of the Host section for Presentation.

UPDATE: The manifest is an XML file, so re-using markup basically means that once you have the markup you want in one Host section, you copy-and-paste the parts you want to reuse into other Host sections.

Upvotes: 1

Related Questions