Outlook 2010 Context Menu For Embedded Attachments - idMso?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 08:15:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!