You are here:   Home > Access - Ribbons > Load Ribbons Into The Database > ... From XML File

... From XML File


If you want to load ribbon from a Ribbon XML file follow these instructions:

In a standard module create the function "LoadRibbons":

Public Function LoadRibbons()
'Load ribbons from XML file into the database
On Error GoTo Error1
Dim f As Long
Dim strText As String
Dim strOut As String
f = FreeFile
    Open "C:\Folder\Ribbon\AccRibbon.xml" For Input As f
    ' C:\Folder\... has to be replaced by your folder/filename.
    Do While Not EOF(f)
        Line Input #f, strText
        strOut = strOut & strText
    Loop
    Application.LoadCustomUI "AppRibbon_1", strOut
Error1_Exit:
    On Error Resume Next
    Close f
    Exit Function
Error1:
    Select Case Err
        Case 32609
        ' Ribbon already loaded
    Case Else
        MsgBox "Error: " & Err.Number & vbCrLf & _
               Err.description, vbCritical, _
               "Error", Err.HelpFile, Err.HelpContext
    End Select
Resume Error1_Exit
End Function

 

Create a macro named "AutoExec" which will be run when you open the database:

 

Action:

RunCode

Function Name:

LoadRibbons()

 

Autoexec-Makro

Re-start the database.

Select a ribbon for this database:

Ribbon Options"Office Button" / Button "Access-Options" / "Current Database" / "Ribbon and Toolbar Options" / "Ribbon Name:" Select the ribbon that should be loaded when you open the database.

 

After another re-start of the database your ribbon will be displayed.

 

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