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

StackOverflow https://stackoverflow.com/questions/12639337

Question

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

Was it helpful?

Solution

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top