Link to home
Start Free TrialLog in
Avatar of mhnatt
mhnattFlag for United States of America

asked on

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

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" />

Open in new window

Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

mhnatt,

In the many years I have been posting on Experts Exchange I have never referred someone elsewhere...I suppose there is always a first time. The best person I know to answer your question is the Microsoft Excel MVP Ken Puls who authored the book "RibbonX - Customizing the Office 2007 Ribbon". I can't post his email address here but I can give you a few links. This one is his blog:

http://www.excelguru.ca/blog/

And this is a profile on another Q&A site:

http://www.vbaexpress.com/forum/member.php?u=573

I'll leave it to you to figure out how to contact him.

Kevin
ASKER CERTIFIED SOLUTION
Avatar of kenpuls
kenpuls

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mhnatt

ASKER

Whoa, thanks a lot Ken.  If you can imagine, I was quite thrilled to see that it can be done.  I had already begun to plan out how to do a Recent List via some other method (which, would have been unorthodox).  Now if Microsoft would just allow us to change the button icon we'd be in great shape!  Thanks so much again Ken!  Your solution alone has made my membership in EE worth it.