troubleshooting Question

Can I dynamically update the officeMenu on the Office Ribbon (like I do in the ribbon tabs)?

Avatar of mhnatt
mhnattFlag for United States of America asked on
Microsoft AccessMicrosoft Excel
3 Comments1 Solution2242 ViewsLast Modified:
I'm trying to make my own "recent files" list in my custom Office Ribbon, specifically in the <officeMenu> or "Big round Office Button" section.

I ALREADY HAVE A FUNCTION TO GENERATE THE DATA (list of files) BUT MY PROBLEM IS that I need a way to dynamically update the ribbon "specifically" the OfficeMenu (button) section dynamically.

For those who will say that this by default already shows a recent files list, I am doing this on a custom front-end Access application in runtime, to show the most recent backends that have been opened.

While I can easily make dynamic menus in the ribbon using the <dynamicMenu> tag, it appears that the officeMenu section is very restrictive.  I was hoping to do something like (see the last line):

<ribbon startFromScratch="true">
  <officeMenu>
      <button id="ofm_NewBackEnd" imageMso="FileNew" label="New Back End" onAction ="rbnfn_NewBackEnd"/>
      <dynamicMenu id="rbndynRecent" size="large" label="Recent Files" imageMso="ImportTextFile" getContent="rbnfn_GetRecentFiles" />

But as I expected, the officeMenu does NOT like a dynamicMenu.  Any ideas?

Thanks!

<ribbon startFromScratch="true">
  <officeMenu>
      <button id="ofm_NewBackEnd" imageMso="FileNew" label="New Back End" onAction ="rbnfn_NewBackEnd"/>
      <dynamicMenu id="rbndynRecent" size="large" label="Recent Files" imageMso="ImportTextFile" getContent="rbnfn_GetRecentFiles" />
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros