Wenn Sie Elemente zu einem Kontextmenü (Multifunktionsleiste) in einem VSTO Outlook-Add-In (für Outlook 2009) hinzufügen, gibt es eine Möglichkeit, dasselbe Kontextmenü für mehrere IDMso (dh ich möchte die gleichen Elemente hinzufügen, wenn einzelne oder mehrere E-Mails ausgewählt sind)? Ich habe versucht, das XML unten, aber das Schema mag nicht, dass ich die gleiche Schaltfläche ID an mehreren Orten wiederverwenden.Wiederverwendung des gleichen contextMenu XML für ContextMenuMailItem und 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>
Idealer ich denke, ich so etwas wie dies möchte:
<?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>