问题
I am working on Otlook 2010 add-in and currently customizing Ribbon UI. So far so good, but I have one problem with customizing context menu for embedded objects in mails. I have tried many idMso context menus, but none of them is working.
Do anyone have experience which idMso is context menu shown below or how to add new button there?
Sample of my custom-ribbon.xml:
<?xml version="1.0" encoding="utf-8"?>
<customUI onLoad="OnRibbonLoad" xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<contextMenus>
<contextMenu idMso="ContextMenuText">
<button id="MyContextMenuText"
imageMso="HappyFace"
label="ContextMenuAttachments"
onAction="OnMyButtonClick" />
</contextMenu>
</contextMenus>
</customUI>
回答1:
Your xml seems fine. But depending on what you click, there is a different context menu showing up.
The ContextMenuText
is the context menu which shows up on right click
when writing or editing email.
ContextMenuPicture
is the context menu for right click on a picture.
And so on..
ContextMenus Add-In for Office 2010 Use this add-in to help determine the context menu names. After install the context menu name appears on the bottom of the menu.
Also make sure in the ThisAddIn.cs file, you have overridden the following method
protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new Ribbon1();
}
来源:https://stackoverflow.com/questions/13307143/outlook-2010-context-menu-for-embedded-attachments-idmso