Add standard command button “New Slide” to custom ribbon in office add-in

前端 未结 5 1282
盖世英雄少女心
盖世英雄少女心 2021-01-27 17:59

I have created my customized ribbon in an addIn. Now I would like to add the New Slide command that exist in home screen (see screenshot below)

5条回答
  •  耶瑟儿~
    2021-01-27 18:27

    i currently have new slide button in my addin like the image below which gives me a new slideenter image description here

    however I want the option like the already existing new slide in home ribbon where I can choose templates.Is there any way to invoke this button in my customized ribbon so below is my newslide that is what i want to get in my addin

    enter image description here

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

提交回复
热议问题