Figure 1 shows a typical Access 2010 File Menu (Backstage) with all the choices available.
Figure 2 shows what the File Menu might look like after applying the custom Ribbon that manipulates the Backstage.
To achieve the result shown in Figure 2, just include the following XML snippet within your custom Ribbon.
<backstage> <button idMso="FileSave" visible="false"/> <button idMso="SaveObjectAs" visible="false"/> <button idMso="FileSaveAsCurrentFileFormat" visible="false"/> <button idMso="FileOpen" visible="false"/> <button idMso="FileCloseDatabase" visible="false"/> <tab idMso ="TabInfo" visible="false"/> <tab idMso ="TabRecent" visible="false"/> <tab idMso ="TabNew" visible="false"/> <tab idMso ="TabPrint" visible="false"/> <tab idMso ="TabShare" visible="false"/> <tab idMso ="TabHelp" visible="false"/> <button idMso="ApplicationOptionsDialog" visible="false"/> <button idMso="FileExit" visible="false"/> </backstage>To see this in action, please download the demo file here. As usual, I would appreciate any comments or feedback. Thank you.
Original post date: September 30, 2014
Tried to download demo file and get "not found" error.
ReplyDeleteHi. Sorry about that. The link was broken but it's fixed now. Please try again. Thank you.
DeleteHi. Nice job.
ReplyDeleteIs there any way of making the controls visible/invisible depending on a user's access permissions?
Hi. Yes there is a way to hide or show ribbon controls by using the GetVisible callback. Check out this website for an example: https://www.accessribbon.de/en/?Access_-_Ribbons:Callbacks:getVisible
DeleteSorry I should have been clearer. I was meaning the Backstage controls. When I try to use GetVisible on say "TabInfo", I get "Callback functions cannot be specified on built-in controls". After much googling, this apparently is the way it's designed to work. I was hoping you had an alternate method?
ReplyDeleteAh, I see. I haven't tried it yet; but if this is not possible, then the only way I could think of trying right now is to create a separate Ribbon XML per user permission. You load the basic one first to avoid any errors and after you determined the user's permission, you can try loading the correct ribbon XML from the XML table. Just my 2 cents...
Delete