none
Error calling callback function OcRibbon_GetLabel RRS feed

  • Question

  • Hi all,

    I developed a outlook 2010 add-in for managing appointments and installed it on several clients.
    (clients have as well skype for business installed)
    Im my Ribbon.xml I have two callback functions (Ribbon_GetLabel and Ribbon_GetImage) to get propper text/image from my ressourc files. In my add-in all works like expected (Text/Image get displayed as expected).

    But somtimes when I open a incomming email I get tree error messageboxes

    Title: Runtimeerror in user defined user interface in MS Office 2016-Add-in for recorded conversations (translated from german)
    - Error calling callback function "OcRibbon_GetLabel" (2x)- Error calling callback function "OcRibbon_GetImage"

    Is this the skype add-in that causes problems or do I missed somthing out in my own add-in ???

    Any help is highly appreciated!!

    TIA acki4711

    Tuesday, March 6, 2018 10:04 AM

All replies

  • Hello acki4711,

    >>Is this the skype add-in that causes problems or do I missed somthing out in my own add-in ???

    You could unload the skype add-in to check if the issue is related to skype add-in.

    >>two callback functions (Ribbon_GetLabel and Ribbon_GetImage)

    Which do the two callback function work for?

    >>But somtimes when I open a incomming email I get tree error messageboxes

    Which ribbon type of your custom ribbon? Did you ever specify specific xml for specific ribbonID?

    Best Regards,

    Terry



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 7, 2018 3:06 AM
  • Hi Terry,

    Thanks for your reply.

    Will try to unload skype add-in.

    The callback functions work perfectly for my own addin.

    Not sure what you mean by ribbon type..
    I wrote a customUI .xml to define the tab and buttons for my own ribbon and a class with the callback functions implementing office.IRibbonExtensibility ?

    Regards, acki4711




    • Edited by acki4711 Wednesday, March 7, 2018 8:45 AM
    Wednesday, March 7, 2018 8:44 AM
  • Hello acki4711,

    For a Ribbon(Designer), it has a RibbonType such as "Microsoft.Outlook.Explorer", that means your custom ribbon will show in explorer ribbon. If you change it to "Microsoft.Outlook.Mail.Read", it will only show in ribbon while reading mail in inspector.

    For a Ribbon(XML), it has the similar setting for it. Note below code in ribbon cs file.

     public string GetCustomUI(string ribbonID)
            {
                return GetResourceText("VCOutlookAddInTest.Ribbon1.xml");
            }

    This is a default setting which will try to load ribbon setting in Ribbon1.xml for every ribbon. Here, we recommend you specify xml for different ribbon.

    For instance, if you want your custom tab show in ribbon while reading mail.

    Here is the simply code.

     public string GetCustomUI(string ribbonID)
            {
                if (ribbonID == "Microsoft.Outlook.Mail.Read") { 
                return GetResourceText("VCOutlookAddInTest.Ribbon1.xml");
                }
                return "";
            }

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 8, 2018 1:50 AM
  • Terry,

    

    I didn't worked with designer, wrote a simple .xml by hand...

    Where should I define a ribbon type here ?

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <ribbon>
        <tabs>
          <tab id="MyTab1" getLabel="Ribbon_Getlabel">
            <group id="MyTab" getLabel="Ribbon_Getlabel">
              <button id="btnSomebutton" getLabel="Ribbon_Getlabel" onAction="OnBtnSomeButton" getImage="Ribbon_GetImage" size="large"/>
            </group>
          </tab>
        </tabs>
      </ribbon>
    </customUI>

    The problem is not that my ribbon shows up in a wrong spot, the problem is that callback functions I defined  for my own ribbon (getLabel, getImage) are called from a third party (skype) add-in???

    TIA acki4711

    Friday, March 9, 2018 2:54 PM
  • Hello acki4711?

    >>the problem is that callback functions I defined  for my own ribbon (getLabel, getImage) are called from a third party (skype) add-in???

    Why do you think so? If you disable all other add-ins, will you still get the error?

    >>Where should I define a ribbon type here ?

    The xml does not have the ribbon type, we load different xml for different ribbon xml so the xml could only be load in specific ribbon.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 12, 2018 6:11 AM