none
New button will not appear in new message dialog window in Outlook RRS feed

  • Question

  • Hello,

    In my task, I need to add a button to the new message dialog window in Outlook. I believe the ControlIdentifiers called TabNewMailMessage for this tab in Outlook. I have created a project with template “Outlook2013 and 2016 VSTO Add-in” in VS-2017. In this VS-project I have added a tab with ControlID TabNewMailMessage and button in Design as shown in below picture.

    In my ThisAddIn.cs in event ThisAddIn_Startup writing to a message box to check my my Add-in will start, and this MessageBox pops up when Outlook starts.

    System.Windows.Forms.MessageBox.Show("Add-in Sikkerpost er started");

    I publish my new Add-in to Outlook through VS. The new button will not appear in new message dialog window in Outlook.

    I have tried many thing and googled. I did not find yet what is wrong. Do I need to do more? Have I done something wrong? It is my first VSTO task. I need your help. Thank you!

    Wednesday, May 16, 2018 5:13 AM

Answers

  • Hello majid_fkh,

    Have you ever changed ribbon type for your custom ribbon? While customizing ribbon(design), its default ribbon type is "Microsoft.Outlook.Mail.Read", that means it will only show while reading mail in inspector.

    For supporting more ribbon type, you could select the ribbon and then change the ribbon type. "Microsoft.Outlook.Mail.Compose" is for writing mail message inspector.

    Best Regards,

    Terry


    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 majid_fkh Friday, May 18, 2018 7:28 AM
    Thursday, May 17, 2018 2:51 AM

All replies

  • Hello Majid,

    Do you get any UI errors in Outlook?

    By default, if an add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom Ribbon does not appear, or why a Ribbon appears but no controls appear. For Outlook, the Show VSTO Add-in user interface errors checkbox is located in the Developer section of the details pane. For other applications, the checkbox is located in the General section of the details pane (see Options).

    See How to: Show Add-in User Interface Errors for more information.

    P.S. The TabNewMailMessage id exists only on mail item inspectors. Other Outlook windows like explorers don't have such IDs shown. So, you need to filter where to return the ribbon XML markup. Basically there are two ways for customizing the Fluent UI using VSTO:

    1. Walkthrough: Creating a Custom Tab by Using the Ribbon Designer

    2. Walkthrough: Creating a Custom Tab by Using Ribbon XML

    As you may see you need to use the second one using Ribbon XML and return a custom UI XML markup based on the context passed to the GetCustomUI callback.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers


    Wednesday, May 16, 2018 1:51 PM
  • Hello majid_fkh,

    Have you ever changed ribbon type for your custom ribbon? While customizing ribbon(design), its default ribbon type is "Microsoft.Outlook.Mail.Read", that means it will only show while reading mail in inspector.

    For supporting more ribbon type, you could select the ribbon and then change the ribbon type. "Microsoft.Outlook.Mail.Compose" is for writing mail message inspector.

    Best Regards,

    Terry


    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 majid_fkh Friday, May 18, 2018 7:28 AM
    Thursday, May 17, 2018 2:51 AM
  • Thank you so much. It works now.

    B.S.

    Saturday, May 19, 2018 4:23 AM