0
當將項目添加到在VSTO前景的上下文菜單(色帶)加載(用於Outlook 2009+),有用於多個idMso相同的上下文菜單(一個方式即,當我選擇單個或多個電子郵件時,我想添加相同的項目)?我嘗試了下面的XML,但架構不喜歡我在多個地方重複使用相同的按鈕ID。重用爲ContextMenuMailItem同一文本菜單xml和ContextMenuMultipleItems
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<contextMenus>
<contextMenu idMso="ContextMenuMailItem">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
<contextMenu idMso="ContextMenuMultipleItems">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
</contextMenus>
</customUI>
理想我想,我想是這樣的:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<contextMenus>
<contextMenu idMso="ContextMenuMailItem,ContextMenuMultipleItems">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
</contextMenus>
</customUI>