2
votes

We can create Microsoft Word AddIns using Visual Studio Tools for Office and I have been successful creating an AddIn and showing it in the Custom Task Pane inside the Microsoft Word.

I want to add an AddIn inside the Microsoft Office Ribbon space also instead of a custom Toolbar in it.

Can this be done?

3
While creating addin have you used ribbon control/designer? Custom task pane is a separate item and ribbon control us separate . - FakeisMe
The answers are different from what I asked. Actually, I wanted that I create a WPF application and add it to the ribbon itself in one of the tabs, so that I don't have to study Ribbon Xml or Designer. I already know how to work in WPF, so adding a WPF application straight away to a tab under ribbon will save me from studying Ribbon Xml. Just a short code or something that allows me to add VSTO add in to one of the new/existing ribbon tabs. - teenup
IN WPF itself there should be a ribbon control . U need to add system.windows.controls.ribbon dll to get that , which will help you create the addin. Please see the below url for reference. c-sharpcorner.com/uploadfile/0b73e1/ribbon-control-in-wpf-4-5 - FakeisMe

3 Answers

1
votes

I'll let others answer for VSTO. But if you want the add-in to show ribbon buttons across Word platforms (ie. Word for Windows, Mac, iOS, web), the only way to do that is by using "add-in commands" with the new JavaScript/HTML add-ins framework.

1
votes

With VSTO there are two options:

  • using the Ribbon Designer or
  • implement Ribbon XML manually.

With the first option you get some nice tooling to add and create your Ribbon visually, with the second you will dive deep in and build your custom Ribbon XML code by hand.

The benefit of the second option is that you'll get complete control over everything that is possible with Ribbon XML and won't be limited to what the UI provides to you (RibbonXML can be very extensive, there are huge bibles covering all of that in detail, sky is the limit).

Here are two walkthrough documents that guides you to both options:

Walkthrough: Creating a Custom Tab by Using the Ribbon Designer

Walkthrough: Creating a Custom Tab by Using Ribbon XML

Your other question is, can it be positioned in existing Ribbon tabs ... Yes it can, if you select the fixed Ribbon XML tab IDs you can mix in with existing Tabs:

https://msdn.microsoft.com/en-us/library/bb608593(v=vs.120).aspx

Of course, all of these links are starter pointers, but just start trying to pick one of these and see where you hit a roadblock. That gives you the option to ask a new question with more detail and slowly grow into a full working application!

1
votes

1) Add system.windows.controls.ribbon dll in wpf project. 2) Add Ribbon control in wpf project. use Ribbon Window tag.

See below URL for complete guidance. http://www.c-sharpcorner.com/uploadfile/0b73e1/ribbon-control-in-wpf-4-5/