Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Access 2007 Disable the Office Button with VBA

Posted on 2010-09-19
7
1,800 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

860 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