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:

04.08.2017
Add new Link. ...


04.01.2016
Add new Link. ...

22.09.2015
New - IDBE RibbonCreator 2016 32 Bit and 64 Bit (Version 1.1001) ...

26.06.2015
Update Downloads for "Trusted Locations" - Versions ...

 

Last update:
August 04, 2017, 11:40