Solved

Access 2007 Disable the Office Button with VBA

Posted on 2010-09-19
7
1,744 Views
Last Modified: 2013-11-27
Very new to MSA2007 but coping.  Hoping someone can assist with vba code for Disabling the Office Button.

I have a custom ribbon which needs to display but I just don't want that Office Button to be active.  I would also settle for it to be invisible, but I believe making it invisible is not possible.  Here is the XML I have for my custom ribbon:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon startFromScratch="true">
    <tabs>
             <tab id="dbAtlastTab" label="Atlas Toolbar" visible="true">
                          <group id="dbFilePrint" label="File and Print Tools">
                                       <control idMso="FilePrintMenu" label="File" enabled="true"/>
                                      <control idMso="PageSetupDialog" label="Page Setup" enabled="true"/>
                                        <control idMso="FilePrintPreview" label="Print Preview" enabled="true"/>
                                         <control idMso="PublishToPdfOrEdoc" label="PDF" enabled="true"/>
                                      <control idMso="PrintPreviewClose" label="Close" enabled="true"/>
                            </group>
                          <group id="dbExport" label="Export Tools">
                                       <control idMso="ExportExcel" label="Excel" enabled="true"/>
                                     <control idMso="ExportWord" label="Word" enabled="true"/>
                            </group>
                </tab>
    </tabs>
  </ribbon>
</customUI>
0
Comment
Question by:djk001
  • 3
  • 2
  • 2
7 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 33713524
Only way I know of to "hide" the Office Button is to hide the ribbon.

DoCmd.ShowToolbar "Ribbon", acToolbarNo

but this solution won't work with your custom ribbon.  I'll be watching to see if you get an answer on this one.
0
 
LVL 11

Expert Comment

by:datAdrenaline
ID: 33713571
As far as I know, you can not disable the orb, however, you can disable most of the commands offered by it.

---

FYI, you can turn off the Ribbon completely ... but then you need to create an alternative interface for your users.
0
 
LVL 11

Expert Comment

by:datAdrenaline
ID: 33713572
DOH!!! ... I did not "refresh" prior to replying ... very sorry for the dup info! ...
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

Accepted Solution

by:
djk001 earned 0 total points
ID: 33713766
I found the solution myself with XML as per http://blogs.msdn.com/b/thirdoffive/archive/2006/10/13/customizing-the-office-button-menu-aka-file-menu-and-no-ribbon-solutions.aspx

It doesn't work very well with a custom ribbon but if one is hiding the Ribbon altogether, which I am not, it does seem to work.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 33715173
I generally hide the ribbon and add menu options in the headers of all of my forms.  These are usually labels which are raised to imply some functionality, and when they are clicked, I popup custom shortcut menus.  This avoids the issue of ribbons altogether.
0
 
LVL 11

Expert Comment

by:datAdrenaline
ID: 33716375
The link you point to seems to do as we indicated ... basically manipulate the items in the menu, but the Office Orb is still present ... none the less, I am glad you have found -- and shared -- an exceptable technique to handle your requirements.
0
 

Author Comment

by:djk001
ID: 33720879
fyed I usually do that too when I am the developer.  However, in this case the application was developed many years ago and the client does not want any modifications to it, they just want it running, with Replication and Synchronization, in MSA 2007 as a .mdb.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now