I tried to repro your issue using an add-in I have on my side that creates RibbonX to display file and folder paths, and came up with an interesting result.
I first created a test folder in the directory and made about 10 copies of it.. eg Test 1 – Copy (2) to Test 1 – Copy(9)
The dynamic menu returned nothing. I then figured that I would try and find exactly how many I could fit, so created new ones… eg Test 1, Test 2, etc… This time my menu worked just fine and scrolled off the bottom of the screen.
After doing some digging it turns out that in my setup, having a folder that contains the ( character causes an error in the XML. I haven’t looked to find out why.
I was able to create a menu that scrolled of the screen though, (about 40 items in total) without any issue. How many items were you trying to load in?
]]>it looks like VBA just disregards the string and does not even read the cause the dynamic menu is just empty.
Can I create long drop down menus with a scrollbar or is this not possible?
tx
]]> id=”MyGroup”
getLabel=”MySheet.GetLabel”
getScreentip=”MySheet.GetScreentip”
getSupertip=”MySheet.GetSupertip”
Yes, absolutely. You can use the getLabel callback for the tabs, which allows you to feed them content dynamically. It’s not nearly as complicated as the dynamicMenu though.
Have you got the RibbonX book? There is an example of setting up a Multi-Lingual UI on pages 455-458.
]]>Since the dynamicmenu callback essentially just creates the appropriate XML on the fly I don’t see any reason why you couldn’t have your callback insert the XML to create a new dynamic menu as a submenu insted of a button. You’d just need to write the vba to make it happen.
]]>Re #1: I agree, that’s irritating. I don’t recall that it always did that, but I’m wondering if the behaviour changed with a service pack as I also see that with some of my add-ins now. I haven’t had the time to dig into it deeply yet.
Re #2: Yup. Once you lose the ribbon object, it’s over and you can’t get it back unless you re-open the workbook. I REALLY hope this gets fixed in Office 2010.
With regards to your last point, that would be a great feature. Unfortunately there is no way to do it at this time. I’m also hoping that we see something to solve this in Office 2010, but I don’t know that I’d bet much on it.
]]>I’ve tried using the dynamicMenu approach, but have discovered two things that don’t work so well:
- When you click the menu item, you don’t see the buttons underneath until the NEXT time you click it.
- Worse, when you lose the reference to the ribbon object, the getContent no longer works.
Is there a way to form the entire XML menu code via VBA during the startup of the add-in, then load it, rather than loading a “skeleton” XML menu structure with dynamic menus and updating it in that way? FYI, I have an application that creates command bars and buttons based on database values — so it wouldn’t work for us to create a single “static” XML menu structure — and I’d love to create an equivalent ribbon for our 2007 users. The bars/buttons don’t have to change after the add-in is loaded, so the complexity in creating the menus is only limited to the startup of the add-in.
]]>Is there any solution to this?
]]>