Solved

Access 2007 Disable the Office Button with VBA

Posted on 2010-09-19
7
1,767 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 VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
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…

895 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

14 Experts available now in Live!

Get 1:1 Help Now