none
Change image of built-in control in ribbon xml RRS feed

  • Question

  • I use Ribbon XML to create a custom Ribbon in Outlook 2010. In this ribbon I also created a button using Ribbon XML. This button uses built-in button control(idMso="NavBack").

    My question: Is there a way to overwrite the image when using built-in button control in my case here?

    Thanks.

    This is my code:

    <button idMso="NavBack" size="large" />

    If this is not possible, is there a way to execute built-in function like the "NavBack" using a custom button? I was thinking of create my own "Back" button and then in the callback, execute the "NavBack" built-in function.

    Wednesday, October 10, 2012 1:28 AM

Answers

  • Your first idea is not possible. For the second, you could call CommandBars.ExecuteMso() with the idMso of the built-in control.
     
    The Inspector and Explorer .CommandBars collection object is deprecated and now hidden from the object model. You have to display hidden items in the object model to see those collections objects. However, even though deprecated they still exist and work.
     
    How much longer they'll work is another story with no guarantees, but at least for the moment they do work.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Ah Lun" <=?utf-8?B?QWggTHVu?=> wrote in message news:9cc341f8-cd9c-434a-99d1-fd5aac43cce1...

    I use Ribbon XML to create a custom Ribbon in Outlook 2010. In this ribbon I also created a button using Ribbon XML. This button uses built-in button control(idMso="NavBack").

    My question: Is there a way to overwrite the image when using built-in button control in my case here?

    Thanks.

    This is my code:

    <button idMso="NavBack" size="large" />

    If this is not possible, is there a way to execute built-in function like the "NavBack" using a custom button? I was thinking of create my own "Back" button and then in the callback, execute the "NavBack" built-in function.


    Ken Slovak MVP - Outlook
    Wednesday, October 10, 2012 2:36 PM
    Moderator
  • Currently using Globals.ThisAddin.Application.ActiveExplorer().CommandBars.ExecuteMso("NavBack"), works fine for me.

    Thanks.

    • Marked as answer by Ah Lun Monday, December 3, 2012 7:21 AM
    Wednesday, October 24, 2012 3:49 AM

All replies

  • Your first idea is not possible. For the second, you could call CommandBars.ExecuteMso() with the idMso of the built-in control.
     
    The Inspector and Explorer .CommandBars collection object is deprecated and now hidden from the object model. You have to display hidden items in the object model to see those collections objects. However, even though deprecated they still exist and work.
     
    How much longer they'll work is another story with no guarantees, but at least for the moment they do work.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Ah Lun" <=?utf-8?B?QWggTHVu?=> wrote in message news:9cc341f8-cd9c-434a-99d1-fd5aac43cce1...

    I use Ribbon XML to create a custom Ribbon in Outlook 2010. In this ribbon I also created a button using Ribbon XML. This button uses built-in button control(idMso="NavBack").

    My question: Is there a way to overwrite the image when using built-in button control in my case here?

    Thanks.

    This is my code:

    <button idMso="NavBack" size="large" />

    If this is not possible, is there a way to execute built-in function like the "NavBack" using a custom button? I was thinking of create my own "Back" button and then in the callback, execute the "NavBack" built-in function.


    Ken Slovak MVP - Outlook
    Wednesday, October 10, 2012 2:36 PM
    Moderator
  • Currently using Globals.ThisAddin.Application.ActiveExplorer().CommandBars.ExecuteMso("NavBack"), works fine for me.

    Thanks.

    • Marked as answer by Ah Lun Monday, December 3, 2012 7:21 AM
    Wednesday, October 24, 2012 3:49 AM