Excel-DNA/ExcelDna

How to access Microsoft.Office.Interop.Excel component from IRibbonControl

emphasis87 opened this issue · 2 comments

Assuming it is possible, can I get a reference to Microsoft.Office.Interop.Excel.EditBox from IRibbonControl (not sure they are related) in getEnabled handler? I am trying to set EditBox PasswordEdit property or otherwise solve password input without it being visible.

Thanks in advance for help!

The ribbon is not related to those control classes in the interop assembly. For the ribbon you only have the xml definition you provide, and then the callbacks you declare in the xml. So, for an editBox in a ribbon you can only set these attributes and callbacks: https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa338199(v=office.12)#editbox

I think you'd probably have to pop up a dialog (like a Windows Forms dialog you create) to get the password entered.