Add the standard "New Slide" command button to the custom ribbon in the office add-in

I created my custom feed in addIn. Now I would like to add the Create Slide command, which exists on the main screen (see screenshot below).

Original powerpoint ribbon

0
powerpoint vsto add-in ribbonx
source share
4 answers

You can add inline controls to your custom tab by convincing their IdMso values. See Office 2013 Help Files: Office Fluent UI Management Identifiers .

For more information on the tape interface, see the following series of articles on MSDN:

0
source share

I currently have a new slide button in my add-on, like the image below, which gives me a new slide enter image description here

however I want an option, like an existing new slide on a home tape, where I can select templates. Is there any way to call this button in my custom feed, so at the bottom of my feed is what I want in my add

enter image description here

private void New_slide_Click(object sender, RibbonControlEventArgs e) { PowerPoint.Application ppApp = Globals.ThisAddIn.Application; ppApp.CommandBars.ExecuteMso("SlideNewGallery"); } 
0
source share

I created a new ribbon based on the xml template in VS. Subsequently, I added a group and a control based on idMso-Value . When using this xml file

 <?xml version="1.0" encoding="UTF-8"?> <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load"> <ribbon> <tabs> <tab id="tab0" label="AddIn"> <group id="grpCustom"> <button idMso="SlideNew" size="large" label="YOUR CUSTOM TEXT"></button> </group> <group idMso="GroupSlides"></group> </tab> </tabs> </ribbon> </customUI> 

This results in a custom feed. Evgeny Astafiev , you can find idMso-Values ​​on MSDN .

customized ribbon controls

0
source share

As explained by Franz , the solution is to use idMso. For the New Slide team you are looking for, if you look at the MSN in the idMso Table for the New Slide, you will find two entries. The one you are looking for is a Gallery with idMso = SlideNewGallery. (not a button). You can add it to XML. I like to use the Ribbon Editor . With the feed editor, it looks like this: Ribbon editor: add idMso command

And in the add-in, it looks like this: Add Ribbon with Standard Command

The corresponding part of the CustomUI XML component is as follows

 <group id="TD_GrpMisc" label="Misc"> <gallery idMso="SlideNewGallery" size="large"/> <button idMso="SlideNew" size="large"/> </group > 
0
source share

All Articles