none
Outlook bug: you can't add a control to a dynamic Ribbon menu located on the ContextMenuContactCardRecipient context menu RRS feed

  • Question

  • Hello,

    Consider a VSTO add-in having this Ribbon XML (Ribbon1.xml):

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <contextMenus>
        <contextMenu idMso ="ContextMenuContactCardRecipient">
          <dynamicMenu id ="dynamicMenu1" visible ="true" label= "My Dynamic Menu" getContent ="dynamicMenu1_GetContent" />
        </contextMenu>
        <contextMenu idMso ="ContextMenuMailItem">
          <dynamicMenu id ="dynamicMenu2" visible ="true" label= "My Dynamic Menu" getContent ="dynamicMenu1_GetContent" />
        </contextMenu>
      </contextMenus>
    </customUI>

    As you can see, the add-in adds a dynamic menu to two context menus: ContextMenuContactCardRecipient and ContextMenuMailItem.

    In the Ribbon Callbacks section of Ribbon1.cs I have these methods:

    public void Ribbon_Load(Office.IRibbonUI ribbonUI) {
        this.ribbon = ribbonUI;
    }
    
    public string dynamicMenu1_GetContent(Office.IRibbonControl control) {
        return GetResourceText("OutlookAddIn8.DynamicMenuContent.xml"); ;
    }
    
    public void OnDynaButtonAction(Office.IRibbonControl control) {
        System.Windows.Forms.MessageBox.Show("!!!");
    }

    The final touch. Add DynamicMenuContent.xml to the project, set its Build Action property to Embedded Resources, and paste the following xml:

    <menu xmlns="http://schemas.microsoft.com/office/2009/07/customui">
      <button id = "dynaButton1" label = "Button" onAction = "OnDynaButtonAction" />
    </menu>

    This xml is provided to Office when you expand the dynamic menu.

    Build the project, start Outlook, right-click an email item in your Inbox, expand the dynamic menu control (it is labelled My Dynamic Menu), and you'll see the button. This is expected.

    Now, in the Reading Pane, right-click the email sender, and expand the dynamic menu. In 32bit Outlook 2016 build 1706 and 1708 (Office Insider Fast) I can't see the button added to that dynamic menu. Add-in Express customers report that this worked in build 1705.

    You can download my project at http://temp.add-in-express.com/support/OutlookAddIn8-ContactCardDynMenuBug.zip; 15 456 bytes.


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader

    Please mark answers and useful posts to help other developers use the forums efficiently.

    Tuesday, July 18, 2017 12:56 PM

Answers

  • Hello Andrei,

    The issue could be reproduced. I test in build 1701 and 1707. The button is fine in build 1701 but missing in 1707 and there is no UI error for the XML.

    I think the issue causes from Office update. I suggest you submit a feedback on Outlook User Voice: https://outlook.uservoice.com/

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Andrei Smolin Wednesday, September 13, 2017 11:52 AM
    Thursday, July 20, 2017 9:28 AM
    Moderator
  • Hello Celeste,

    On UserVoice. Here's a citation from https://social.msdn.microsoft.com/Forums/office/en-US/4ec47ebb-3fc1-4855-95f9-ce626fbe5b52/bug-in-outlook-2016-mailitemsubject-returns-a-wrong-value?forum=outlookdev#a3d36504-ec90-4d5b-88d4-4adefad90e38 by Gabriel Bratton Microsoft (MSFT):

    === An issue like this that is a bug is not suited very well on Uservoice.  Uservoice is primarily intended for Feature Requests.  A dev reported bug would never likely get enough votes to ever make to a number that would get it reviewed by the Outlook Team. ===

    Thank you for confirming the issue. I'm going to report it using the way that Gabriel Suggests.

    May I ask you to check my other report at https://social.msdn.microsoft.com/Forums/office/en-US/2298104b-69cd-43d6-97dc-a3511726f86c/exceptions-when-using-office-and-onenote-interops-in-a-onenote-addin?forum=officegeneral#08a64f13-d47e-4669-bcd4-ef705cdd6804?


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader

    Please mark answers and useful posts to help other developers use the forums efficiently.

    Thursday, July 20, 2017 10:24 AM

All replies

  • Hello Andrei,

    The issue could be reproduced. I test in build 1701 and 1707. The button is fine in build 1701 but missing in 1707 and there is no UI error for the XML.

    I think the issue causes from Office update. I suggest you submit a feedback on Outlook User Voice: https://outlook.uservoice.com/

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Andrei Smolin Wednesday, September 13, 2017 11:52 AM
    Thursday, July 20, 2017 9:28 AM
    Moderator
  • Hello Celeste,

    On UserVoice. Here's a citation from https://social.msdn.microsoft.com/Forums/office/en-US/4ec47ebb-3fc1-4855-95f9-ce626fbe5b52/bug-in-outlook-2016-mailitemsubject-returns-a-wrong-value?forum=outlookdev#a3d36504-ec90-4d5b-88d4-4adefad90e38 by Gabriel Bratton Microsoft (MSFT):

    === An issue like this that is a bug is not suited very well on Uservoice.  Uservoice is primarily intended for Feature Requests.  A dev reported bug would never likely get enough votes to ever make to a number that would get it reviewed by the Outlook Team. ===

    Thank you for confirming the issue. I'm going to report it using the way that Gabriel Suggests.

    May I ask you to check my other report at https://social.msdn.microsoft.com/Forums/office/en-US/2298104b-69cd-43d6-97dc-a3511726f86c/exceptions-when-using-office-and-onenote-interops-in-a-onenote-addin?forum=officegeneral#08a64f13-d47e-4669-bcd4-ef705cdd6804?


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader

    Please mark answers and useful posts to help other developers use the forums efficiently.

    Thursday, July 20, 2017 10:24 AM
  • Hello,

    Thanks for sharing the information.

    For your another thread, we would check if the issue could be reproduced and if there is any solution or workaround.

    Sorry for any inconvenience.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 21, 2017 4:28 AM
    Moderator
  • Thank you very much. You are most helpful. I really appreciate this.

    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader

    Please mark answers and useful posts to help other developers use the forums efficiently.

    Friday, July 21, 2017 7:34 AM
  • You are welcome. I suggest you mark your post as answer to close this thread.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 21, 2017 8:12 AM
    Moderator