I am working on an Excel addin which has a ribbon of its own with some buttons which do some data access/population. One of the buttons/functions imports some data and populates the worksheet. After it populates the sheet, it turns the data into an Excel table using the following code -
fullRange.Worksheet.ListObjects.AddEx(
SourceType: Microsoft.Office.Interop.Excel.XlListObjectSourceType.xlSrcRange,
Source: fullRange,
XlListObjectHasHeaders: Microsoft.Office.Interop.Excel.XlYesNoGuess.xlYes);
My problem is that, every time the data population in an Excel table format is done, the ribbon highlighted changes to Design->Table Tools and not my addin ribbon.
So my question is... Is there a way to programmatically highlight a ribbon in Excel using VSTO? so I can do that right after populating. Thanks in advance!
IRibbonUI
object type? In VBA, you dim an object asIRibbonUI
then use theActivateTab
method. - Trashman