Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the IDs of all the controls of Office 2010 ribbon and interact with ribbon shortcut from custom Add-ins

I want to get all the controls list in the powerpoint 2010 ribbon like the one in the powerpoint option -> customize ribbon-> all commands.

Furthermore, I want to interact with ribbon shortcut from custom Add-ins

like image 662
Rokr_13 Avatar asked Sep 28 '12 11:09

Rokr_13


1 Answers

You will find all office id's you want on microsoft website http://www.microsoft.com/en-us/download/details.aspx?id=6627.

You will find your id's in PowerPointControls.xlsx file.

For create you own menu :

Open your Ribbon.xml

And add following after <ribbon>

<tabs>
    <tab idMso="TabAddIns">
        <group id="ContentGroup" label="Content">
            <button id="textButton" label="Insert Text"
                 screentip="Text" onAction="OnTextButton"
                 supertip="Inserts text at the cursor location."/>
            <button id="tableButton" label="Insert Table"
                 screentip="Table" onAction="OnTableButton"
                 supertip="Inserts a table at the cursor location."/>
        </group>
    </tab>
</tabs>

For a custom addin shortcut, I think you have to add a new tab :

<tab id="YourTab" visible="true" label="Name">
    <group id="YourGroup" label="name">
      <button onAction="CallAddinsHere();" label="Call add-ins"/>
    </group>
  </tab>

If you want to interact with custom addin shortcut, have a look at :

Automate Office Ribbon through MSAA (CSOfficeRibbonAccessibility)

like image 174
Aelios Avatar answered Oct 05 '22 08:10

Aelios