Search code examples
c#tabsword-addinsspelling

c# Word-AddIn recognize ribbon-tab spelling


Different Word versions have different tab spelling. Some have the whole label as uppercase and others have just the first letter. I want know how I can recognize the spelling and change my tab label to the same case.

enter image description here


Solution

  • With this this.Application.Version you cab check the word version. The only thing I am doing then is checking if the version is older than 2013:

    if (Convert.ToDouble(this.Application.Version) > 150)
    {
        Globals.Ribbons.MyRibbon.WinWorker.Label = "lowercase";
    }
    else
    {
        Globals.Ribbons.MyRibbon.WinWorker.Label = "UPPERCASE";
    }