Is it possible to use an external xml for the ribbon? RRS feed

  • Question

  • Hello,

    I'm faced to problem that seems stupid but I don't have the solution.

    Is it possible to use an external ribbon.xml in the public string GetCustomUI? I want to do that:

      public string GetCustomUI(string ribbonID)
               return GetResourceText("C:\Users\username\AppData\Roaming\test\Ribbon.xml");     


    Tuesday, October 1, 2013 12:04 PM


All replies

  • See the code example in this article on the GetCustomUI procedure

    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, October 1, 2013 5:14 PM
  • thank you very much for the answer. I followed steps explained in this link, but hte ribbon doesn't display anything.

    public class Ribbon1 : IRibbonExtensibility

          public string GetCustomUI(string ribbonID)
               StreamReader objReader = new StreamReader("C:\\Users\\" + username + "\\ AppData \\ Roaming \\ test \\ Ribbon.xml", Encoding.GetEncoding("iso-8859-1"));

               string customUIData = objReader.ReadToEnd();

               return customUIData;

                //return GetResourceText("Outlooktest.Ribbon1.xml");

    do you have an idea about it?

    • Edited by suki_11 Tuesday, October 8, 2013 8:53 AM
    Wednesday, October 2, 2013 10:59 AM