我爲我們的員工在PowerPoint中製作了自定義功能區。功能區上的大多數命令鏈接到定製的VBA腳本,但我想包含一個標準的MSO Gallery命令(MSO:SlideNewGallery
)。將MSO圖庫命令添加到自定義PowerPoint功能區
我已成功將按鈕添加到功能區。看起來不錯,但不起作用。我不知道如何將該操作調用到標準的MSO圖庫命令。我嘗試編寫VBA腳本,但在VBA中畫廊命令不能很好地工作,因此腳本只是創建一個新幻燈片,並且不顯示SlideNewGallery
選項。
我是自學成才的,我想我可能只是錯過了一些非常簡單的東西。
我的問題:
- 我應該怎麼辦?
- 我應該在VBA或XML中執行此操作嗎?
這是我區XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="RibbonControl.Onload">
<ribbon>
<tabs>
<tab id="CustomTab1" label="Insurance">
<group id="CustGrp1" label="Template" >
<button id="Btn1" label="New Presentation" screentip="Create a new presentation" image="Default" size="large" onAction="RibbonControl.MyBtnMacro" />
</group>
<group id="CustGrp20" label="Insurance Resources" >
<gallery id="SlideNewGallery" label="New Slide" screentip="Insert an new slide" imageMso="SlideNewGallery" size="large" onAction="RibbonControl.MyBtnMacro" />
<button id="Btn22" label="Insert Herman" screentip="Insert a Herman Picture" image="HermanIcon" size="large" onAction="RibbonControl.MyBtnMacro" />
<button id="Btn23" label="Insert Logo" screentip="Insert a logo for OMA Insurance or any of our affilliates" image="OMAInsurance" size="large" onAction="RibbonControl.MyBtnMacro" />
<button id="Btn21" label="Content Ideas" screentip="See or copy our favourite insurance presentations" imageMso="BuildingBlockProperties" size="large"
onAction="RibbonControl.MyBtnMacro" />
<button id="Btn24" label="Insurance Brand Standards" screentip="Go to the Insurance Brand Standards Document" image="Brand" size="large" onAction="RibbonControl.MyBtnMacro" />
</group>
<group id="CustGrp3" label="Tools" >
<button id="Btn30" label="Convert to Brand" screentip="Convert this Presentation to BRAND style" image="Convert" size="large" onAction="RibbonControl.MyBtnMacro" />
<button id="Btn31" label="Reset Slide" screentip="Apply the fonts and layouts of our Brand" imageMso="QuickStepsGallery" size="large"
onAction="RibbonControl.MyBtnMacro" />
<button id="Btn32" label="Insert Asterisk" screentip="Insert an Asterisk" image="AsteriskIcon" size="large" onAction="RibbonControl.MyBtnMacro" />
<button id="Btn33" label="Select Everything" screentip="Select all the text in the active area" imageMso="LassoSelect" size="large" onAction="RibbonControl.MyBtnMacro" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
它應該可能是'