Add a pop up menu within customui.xml? - excel

I am writing a custom menu for Excel by editing customui.xml.
The buttons and "dropdown" menus are working fine, but I want to replicate the little arrow in the bottom of the standard Excel and Office menu groups (when you click one of these a whole form pops up). I can do the form, but I can't find in the documentation: how to create that little clickable arrow?

What you're referring to is called the DialogBoxLauncher, and you can read more about customizing it here:
http://msdn.microsoft.com/en-us/library/bb400926(v=office.12).aspx
Also, as an aside, Ron de Bruin maintains what I think is the ultimate reference on customizing the Office Ribbon interface.

Related

Add combo box in OfficeJS Excel

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.

Sendkeys to the right custom Excel ribbon

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.

VSTO - How to make Ribbon buttons to fill vertically the blank space

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.

VBA output dialog/window or similar in Excel (2010)

I've little experience with VBA and Office applications.
My goal is to export data from an Excel sheet to another application. But before the export happens, I want a popup dialog or similar to appear when the user presses the "Export"-button, so he/she can review the data which will be ecxported. The reason for this is that the exported data is from various places in the sheet (or sheets), so a visual review is a good idea.
MsgBox is, of course, to small. And it's not meant for presenting lots of data.
What's a practical/elegant/effective/easy way of doing this? Ideally the popup window with the preview shoul have a "Go ahead"-button too, but this is not strictly necessary.
You have to open Visual Basic editor. On menu, choose "Insert" -> "User Form". Then you can create custom user forms with text fields, labels, check boxes, buttons etc. Here you can find basic informations.

How do I enable a range selector on an Excel ribbon bar?

What is the standard practice for adding range selection controls to a ribbon bar in Excel? I'm creating an Add-In and need to enable the user to define a series of ranges. Here's a link to a question with an illustration of what I want Provide a range selection tool/utility to the user in Excel VBA. The answer to the question however only works in the context of a winform. My research suggests you can't use RefEdit controls directly in a ribbon bar. Is that true? If so, what solution do you recommend? I considered creating a button that triggers a popup containing a RefEdit control, but that strikes me as a poor user experience since it involves additional clicks by the user.
Unfortunately, you are correct: the RefEdit control cannot be used within a ribbon. However, you can use a button control to populate an editBox control with the currently selected range, using the editBox's getText dynamic attribute. This will not only place a control within the ribbon that displays the selected range and holds the value there with a single click, but -- if needed -- other automated processes can be executed as well.

Resources