You are here:   Home > Access - Ribbons > Ribbon XML / Controls > Manipulate existing Access Ribbons

Manipulate existing Access Ribbons

 

In Ribbon XML you have the option to replace existing Access Ribbon functionality with user-defined commands, see section <commands>.

Following example illustrates how to replace the Access functions "Cut" and "Copy".

Cut / Paste - Access Tab Home

Sample Ribbon XML file:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <commands>
        <commands idMso="Cut" onAction="CallbackCut"/>
        <commands idMso="Copy" onAction="CallbackCopy"/>
    </commands>
</customUI>


Here you can find the description on how to identify idMso of Access controls.

Clicking one of the buttons will now execute the appropriate callback. The same happens on ExcecuteMso.

Application.CommandBars.ExecuteMso("Copy")


Contents of module "basCallbacks":

Option Compare Database
Option Explicit
  
Sub CallbackCut(control As IRibbonControl, _
                ByRef bolCancel As Boolean)
    MsgBox "Cut"
    bolCancel = True
End Sub
  
Sub CallbackCopy(control As IRibbonControl, _
                 ByRef bolCancel As Boolean)
    MsgBox "Copy"
    bolCancel = True
End Sub

 

You can find this sample in Sample DB 1

 

 

Last Updates:

18.03.2021
New Download added. ...

25.10.2018
Update Site "Trusted Locations" ...

22.10.2018
New Download added. ...

08.04.2018
IDBE RibbonCreator 2016 (x86 and x64) for Office 2013 and Office 2016 - new release. ...

 

Last update: