C# RegisterRibbonX invalid parameter

Started by AndyW, August 10, 2021, 11:31:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndyW

I'm investigating porting my code from VBA & VB6 to C#. However, I am having trouble when trying to register my ribbon.

When calling from here, I get an Invalid Parameter

DiagramRibbon dr = new DiagramRibbon();
            try
            {
                visioDoc.Application.RegisterRibbonX(dr, visioDoc, Visio.VisRibbonXModes.visRXModeDrawing, "xx");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }


This is my class handling the ribbon.

    public class DiagramRibbon : IRibbonExtensibility
    {

        public string GetCustomUI(string RibbonID)
        {
            StreamReader customUIReader = new System.IO.StreamReader("D:\\App\\Ribbon_Diagram.xml");
            string customUIData = customUIReader.ReadToEnd();
            return customUIData;
        }
    }


It doesn't get as far as calling this method.
Live life with an open mind