Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access 2007 Disable the Office Button with VBA

Posted on 2010-09-19
7
Medium Priority
?
1,878 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
[X]
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
  • 3
  • 2
  • 2
7 Comments
 
LVL 48

Expert Comment

by:Dale Fye
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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

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 48

Expert Comment

by:Dale Fye
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

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.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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