none
Finding the "ControlId" for various tabs in Outlook RRS feed

  • Question

  • I am using a VSTO project to build an add-in for Outlook and I want to be able to add a "group" to an existing tab. I am using the visual designer to design the ribbon, but in order for my group to show up on an existing tab I need to know the "ControlId", or "OfficeId" (idMso) of the existing tab. I am specifically looking to add a group to an existing tab in the "Contacts" explorer window.



    Tuesday, December 13, 2016 2:57 AM

Answers

  • Jeremy,

    I've created a simple test project to confirm the idMso. The following is my xml ...

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="explorerRibbonLoaded" loadImage="GetRibbonImage">
      <ribbon>
        <tabs>
          <tab idMso="TabContact">
             <group id="TabGroupTest" label="Test group">
              <button id="Test" size="large" onAction="OnButton" label="Test Btn"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

    The following is screenshot of the result ...

    I used the "Microsoft.Outlook.Contact" ribbon Id. Please verify your code. Remove from your tab all handlers and place static text, see if your group will appear.

    Hope this clarify something for you.


    Slava Ivanov

    Tuesday, December 13, 2016 8:08 PM

All replies

  • See https://www.microsoft.com/en-us/download/details.aspx?id=6627

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, December 13, 2016 3:52 AM
  • Yes I've seen that, I would've included that in my post but my account was still my account is "verified" so it wouldn't let me post images or links. The download results in a bunch of excel files and my guess the answer would have been in the one titled "OutlookContactItemControl". I saw an entry for "TabContact" which I tried, but still nothing showed up on the Contact explorer window. "TabReadMessage" works for the Email explorer window, I need to find the equivalent for Contacts.

    Tuesday, December 13, 2016 5:14 PM
  • You need to set the IdMso property of your ribbon tab to "TabContacts"

    Best regards,


    Slava Ivanov

    Tuesday, December 13, 2016 5:34 PM
  • Right, that's what I thought but I've added a "group" with a button to that tab using the visual designer and when I launch the project I still don't see the group. I've been able to do this with the Email explorer window using "TabReadMessage" as the IdMso, but for some reason "TabContacts" doesn't work. Also, I'm using outlook 2013.
    Tuesday, December 13, 2016 5:39 PM
  • Update: using "TabContacts" (plural instead of singular) shows the group on the home page if I select contacts. However, I am trying to add a group to the explorer window that comes up when I double-click an individual contact.
    Tuesday, December 13, 2016 5:43 PM
  • For Office 2013, the full list of idMso available over here: 

    https://www.microsoft.com/en-us/download/confirmation.aspx?id=36798

    If you want to add your custom group to a new contact form use "TabContact", per documentation. 


    Slava Ivanov

    Tuesday, December 13, 2016 6:15 PM
  • Correction: I'm using Outlook 2016, apologies.

    I was able to add a group to the Email Explorer window by using a idMso of "TabReadMessage", and I could not find that ID anywhere in the documentation in the link you provided. Is there a more recent version of the documentation? It seems they have must have changed the names of the idMso's if "TabReadMessage" was not in there.

    Tuesday, December 13, 2016 6:55 PM
  • I was able to find documentation for 2016 as well but it did not have the idMso "TabReadMessage" either: https://www.microsoft.com/en-us/download/confirmation.aspx?id=50745
    Tuesday, December 13, 2016 6:59 PM
  • Jeremy,

    There is no need to look for more documentation. Outlook 2010 docs as suggested Dmitry are more than sufficient, you just need to spend a time to discover everything. For example, as per your last question "TabReadMessage" id is stated in the "Tab" column of "outlookmailreadcontrols.xlsx" and has the list of all available controls on that tab. Same way you would find the "TabContact" in "outlookaddritemcontrols.xlsx". And finally "TabContacts" would have details in "outlookexplorercontrols.xlsx".

    I am sorry, but I got lost what is your real question? Is this documentation, idMso for "Contacts" explorer or idMso for the single contact?


    Slava Ivanov

    Tuesday, December 13, 2016 7:18 PM
  • Hi Slava, thank you for your patience.

    I am trying to add a group to the window that shows a single contact. In other words, when you view your contacts and double click one of them, a new explorer window opens up. It's the ribbon on this window I'm trying to add my group to (FYI, your "current view" needs to be anything other than "People", otherwise a different window comes up). I'm still not able to post images otherwise I'd include a screenshot. I am currently using "TabContact" for the idMso but to no avail.

    Tuesday, December 13, 2016 7:29 PM
  • Jeremy,

    I've created a simple test project to confirm the idMso. The following is my xml ...

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="explorerRibbonLoaded" loadImage="GetRibbonImage">
      <ribbon>
        <tabs>
          <tab idMso="TabContact">
             <group id="TabGroupTest" label="Test group">
              <button id="Test" size="large" onAction="OnButton" label="Test Btn"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

    The following is screenshot of the result ...

    I used the "Microsoft.Outlook.Contact" ribbon Id. Please verify your code. Remove from your tab all handlers and place static text, see if your group will appear.

    Hope this clarify something for you.


    Slava Ivanov

    Tuesday, December 13, 2016 8:08 PM
  • Thank you very much. Your reply helped me realize that I did not add the ribbon type "Microsoft.Outlook.Contact" to my list of ribbon types. That was the issue. Thank you for your help.
    Tuesday, December 13, 2016 9:06 PM
  • Hello Jeremy,

    It is not clear what Office versions you need to support, but the files for last three Office versions are listed below:

    Office 2010 Help Files: Office Fluent User Interface Control Identifiers

    Office 2013 Help Files: Office Fluent User Interface Control Identifiers

    Office 2016 Help Files: Office Fluent User Interface Control Identifiers

    Also you may find the How to: Customize a Built-in Tab article helpful.


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

    Tuesday, December 13, 2016 11:07 PM