ribbon.xml 4.2 KB
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="ribbon.OnAddinLoad">
    <ribbon startFromScratch="false">
        <tabs>
            <tab id="SystemAddin" label="系统插件" insertBeforeMso="TabHome">
				<group id="btnDemoGroup" label="group1">
                    <!-- <button id="btnShowMsg" label="弹出消息框" onAction="ribbon.OnAction" getEnabled="ribbon.OnGetEnabled"  getImage="ribbon.GetImage" visible="true" size="large"/>
                    <button id="btnIsEnbable" getLabel="ribbon.OnGetLabel" onAction="ribbon.OnAction" enabled="true"  getImage="ribbon.GetImage" visible="true" size="large"/>
                    <button id="btnShowDialog" label="弹对话框网页" onAction="ribbon.OnAction" getEnabled="ribbon.OnGetEnabled"  getImage="ribbon.GetImage" getVisible="ribbon.OnGetVisible" size="large"/>
                    <button id="btnShowTaskPane" label="弹任务窗格网页" onAction="ribbon.OnAction" getEnabled="ribbon.OnGetEnabled"  getImage="ribbon.GetImage" getVisible="ribbon.OnGetVisible" size="large"/>
                    <button id="btnApiEvent" getLabel="ribbon.OnGetLabel" onAction="ribbon.OnAction" getEnabled="ribbon.OnGetEnabled"  getImage="ribbon.GetImage" getVisible="ribbon.OnGetVisible" size="large"/>
                    <button id="btnWebNotify" label="给业务系统发通知" onAction="ribbon.OnAction" enabled="true"  getImage="ribbon.GetImage" getVisible="ribbon.OnGetVisible" size="large"/>
                    <button id="btnOpenWebFile" label="打开远程文件" onAction="ribbon.OnAction" enabled="true"  getImage="ribbon.GetImage" getVisible="ribbon.OnGetVisible" size="large"/> -->
                    <button id="btnSaveToServer" label="保存到OA" onAction="ribbon.OnAction" enabled="true" getImage="ribbon.GetImage" size="large"/>
                    <button id="btnInsertRedHeader" label="套红头" onAction="ribbon.OnAction" enabled="true" getImage="ribbon.GetImage" size="large"/>
				</group>
            </tab>
        </tabs>
    </ribbon>
        <commands>
        <!-- idMso支持getEnabled和onAction,不支持visible属性和事件-->
        <!-- 文档复制和剪切控制-->
        <!-- <command idMso="Copy" getEnabled="OnGetEnabled" />
        <command idMso="Cut" getEnabled="OnGetEnabled" /> --> -->
        <!-- 文档保存和另存控制-->
        <command idMso="FileSave" enabled="true" onAction="ribbon.OnAction"/>
        <!-- <command idMso="SaveAll" getEnabled="OnGetEnabled" />
        <command idMso="FileSaveAsMenu" getEnabled="OnGetEnabled" onAction="OnAction"/>
        <command idMso="FileSaveAs" getEnabled="OnGetEnabled" onAction="OnAction"/>
        <command idMso="FileSaveAsPicture" getEnabled="OnGetEnabled" />
        <command idMso="SaveAsPicture" getEnabled="OnGetEnabled" />
        <command idMso="FileMenuSendMail" getEnabled="OnGetEnabled" />
        <!-- 输出PDF控制-->
        <command idMso="SaveAsPDF" getEnabled="OnGetEnabled"/>
        <command idMso="FileSaveAsPDF" getEnabled="OnGetEnabled"/>
        <command idMso="ExportToPDF" getEnabled="OnGetEnabled"/>
        <command idMso="FileSaveAsPdfOrXps" getEnabled="OnGetEnabled"/>
        <!-- 输出OFD控制-->
        <command idMso="SaveAsOfd" getEnabled="OnGetEnabled"/>
        <command idMso="FileSaveAsOfd" getEnabled="OnGetEnabled"/>
        <!--文档打印控制-->
        <command idMso="FilePrint" getEnabled="OnGetEnabled"/>
        <command idMso="FilePrintMenu" getEnabled="OnGetEnabled"/>
        <command idMso="FilePrintPreview" getEnabled="OnGetEnabled"/>
        <!--文档修订控制-->
        <command idMso="ReviewTrackChangesMenu" getEnabled="OnGetEnabled"/>
        <command idMso="ReviewRejectChangeMenu" getEnabled="OnGetEnabled"/>
        <command idMso="ReviewAcceptChangeMenu" getEnabled="OnGetEnabled"/>
        <!--文档新建控制-->
        <command idMso="FileNewMenu" getEnabled="OnGetEnabled" onAction="OnAction"/>
        <command idMso="FileNew" getEnabled="OnGetEnabled" onAction="OnAction"/>
        <command idMso="WindowNew" getEnabled="OnGetEnabled" onAction="OnAction"/>
        <command idMso="FileNewBlankDocument" getEnabled="OnGetEnabled" onAction="OnAction"/> 
    </commands>
</customUI>