locked
VSTO Excel Addin application RRS feed

  • Question

  • Through C# programming how can i identify custom excel Addin is active or not.

    Using C# program, in active excel workbook how to get active(or focused) ribbon menu tab.

    Wednesday, August 21, 2019 5:41 PM

All replies

  • Hi friend,

    Welcome to the MSDN forum.

    What do you mean by active?

    Do you want to check whether the addin is load or user use the addin currently?

    For addin is load, you could try:

    // This will return all the word addins
    
                Microsoft.Office.Core.COMAddIns comAddins = Globals.ThisAddIn.Application.COMAddIns;
    
     
    
                // Iterate through all the addins
    
                foreach(Microsoft.Office.Core.COMAddIn addin in comAddins)
    
                {
    
                    var isActive = addin.Connect;
    
                }

    >>in active excel workbook how to get active(or focused) ribbon menu tab.

    There is no way to get active or ribbon menu.

    Hope it could help you.

    Best Regards,

    Perry


    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, August 22, 2019 5:38 AM
  • Thanks for reply.

    When i say active i mean from excel menu which tab is focused(like Home, Insert, Page Layout.....)

    Thursday, August 22, 2019 1:15 PM
  • Hi friend,

    Thanks for your feedback.

    According to your further description, we are sorry to tell you that it is impossible. There is no such API to capture this behavior.

    Hope it could help you.

    Best Regards,

    Perry



    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

    Friday, August 23, 2019 4:28 AM