簡體   English   中英

獲取Office 2010功能區的所有控件的ID,並與自定義加載項中的功能區快捷方式進行交互

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

我想獲得powerpoint 2010功能區中的所有控件列表,如powerpoint選項中的那個 - >自定義功能區 - >所有命令。

此外,我想與自定義加載項的功能區快捷方式進行交互

您將在microsoft網站http://www.microsoft.com/en-us/download/details.aspx?id=6627上找到所需的所有辦公室ID。

您將在PowerPointControls.xlsx文件中找到您的ID。

為了創建你自己的菜單:

打開Ribbon.xml

並在<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>

對於自定義插件快捷方式,我認為您必須添加一個新標簽:

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

如果您想與自定義插件快捷方式進行交互,請查看:

通過MSAA自動化Office功能區(CSOfficeRibbonAccessibility)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM