Solved

Access 2007 Disable the Office Button with VBA

Posted on 2010-09-19
7
1,811 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

685 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