I'm working with a custom Excel add-in that unfortunately doesn't expose its functions to VBA, so I'm resorting to a SendKeys approach (see picture). Excel assigns Y1 to the Help ribbon, and all the other custom add-ins get assigned Y2, Y3, etc. Thankfully, it looks like these shortcut keys are consistent internationally (Japan, LatAm).
The issue is that depending on the installation order, custom ribbons will get assigned a different shortcut key for different users.
I'm looking for a way to identify the position of "DataFlow" ribbon in Excel so I can SendKeys to the right ribbon. Thanks in advance!
The Excel extensibility model doesn't provide anything for that. You can try using the Microsoft Active Accessibility technology to identify where tab controls are located and their properties.
The Fluent UI provides the IRibboUI.ActivateTab method which activates the specified custom tab. You just need to specify the identifier of the custom Ribbon tab to be activated.
Related
I am developing an add-in with Office JS, In need add combobox when click in a bottom but I dont see this options it is possible
add combobox with OfficeJS
Combo boxes are not supported in OfficeJS for ribbon customizations. Supported control types are:
Simple buttons - trigger specific actions.
Menus - simple menu dropdown with buttons that trigger actions.
Read more about ribbon customizations in the Add-in commands for Excel, PowerPoint, and Word article.
But you may consider creating a task pane with any controls. There are not limitations on the controls used for task panes (unlike ribbon).
Remember that you can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team go through the planning process.
I have this ribbon defined in my VSTO addin for Excel:
When I run the application in a narrow monitor, the ribbon appears like this:
How to avoid the groups to be changed by a drop down button? If I decrease window width, default ribbon groups are not changed, only my custom groups, so I am pretty sure it is possible.
I have read something about "autoScale" property in XML, but I am not sure how to apply that in my case.
Thanks
Jaime
I'm building a VSTO excel application, using Visual Studio 2013. I have one Large sized Ribbon button in one column, next to two Regular sized in another column. What I want is to fill the vertical space in the regular buttons column equally.
To see an example of what I want to do, see the "Calculation" group of "FORMULAS" tab in excel. My regular buttons are stacking on the top, but i want them to fill the empty space just like the "Calculate Now" and the "Calculate Sheet" are doing in this ribbon.
How do I do this?
Thanks.
The Fluent UI doesn't provide any property or attribute for that.
Read more about the Fluent UI (Ribbon UI) in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
Not all features (controls) are available for external developers.
I'm not sure if you will be able to do this. I was also looking for this but didn't find a solution. The ribbon is limited for programmers in certain features, for example you cannot make a menu with headers (like the insert chart in excel) or in ribbon galleries (like the chart styles),... I think this button fill is also one of these features.
Does anyone know what is Libre Calc’s equivalent for Excel’s RefEdit control? All other Excel UserForm controls seem to have corresponding controls for Libre Dialog forms. If there isn’t one, is it possible to tweak some other control (like Combo Box) into behaving like reference input box?
For those who don’t know RefEdit, it is the control that lets the user specify range address. More detailed explanation is e.g. in How to code a .NET RefEdit Control on Gabhan Berry’s Excel Programming blog or in KB213776.
Yes, there is such a possibility - you must use XRangeSelectionListener
By setting different RangeSelectionArguments you will get different picker behavior.
An example of a macro that is shown in this animation is here RefEdit_Demo.ods
There is only one ribbon object in the add-in, so it's shared between all workbooks. How I can make different ribbon buttons enabled in different workbooks?
I assume you are talking about Ribbon XML as the designer tries to make it seem like the ribbon is more based on the document.
If you are using Ribbon XML as I suspect, then this is very difficult and I would suggest two options. Either switch to the Ribbon Designer, which you can handle the Loaded and other events and set the .Enabled property on the button controls. Or give http://vstocontrib.codeplex.com/ a go, it is designed to make this scenario much easier. Have a read of the doco around the Ribbon Factory.