Custom Ribbons in Access 365 (1 Viewer)

Drand

Registered User.
Local time
Tomorrow, 00:03
Joined
Jun 8, 2019
Messages
179
Hi

I am trying to create custom ribbons for my application in access 365.

I have tried the following XML in my UsysRibbons table which I used in other applications some time ago.

<customUI xmlns="http://schemas.microsoft.com
/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab idMso="TabCreate" visible="false" />
<tab id="dbCustomTab" label="A Custom Tab" visible="true">
<group id="dbCustomGroup" label="A Custom Group">
<control idMso="Paste" label="Built-in Paste" enabled="true"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Now it creates an error: http//schemas.microsoftoffice.com/office2006/01/customui

Is this because it is referencing Ofiice 2006 and if so, what do I need to do to get this to work in Access 365.

As usual, would appreciate some assistance with this.

Many thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:03
Joined
Oct 29, 2018
Messages
21,467
Hi. Just a guess but I think 2006 was the old one. Try using 2009.

Sent from phone...
 

Micron

AWF VIP
Local time
Today, 10:03
Joined
Oct 20, 2018
Messages
3,478
FWIW, this is one of the better custom ribbon sources I've found (I believe the page uses 2006 but it's old info. I agree, use 2009)

 

Drand

Registered User.
Local time
Tomorrow, 00:03
Joined
Jun 8, 2019
Messages
179
Thanks for that but same issue!
 

Micron

AWF VIP
Local time
Today, 10:03
Joined
Oct 20, 2018
Messages
3,478
You show it broken up on 2 lines. Maybe that's the issue, or it's just an incorrect copy/paste? This is what I have tested and it works in 365/16

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"

Do you have 'show add-in user interface errors' enabled in Options>client settings>general?
 

Drand

Registered User.
Local time
Tomorrow, 00:03
Joined
Jun 8, 2019
Messages
179
Thank you all

I copied and pasted your statement and it now works fine! Not really sure why but much appreciated!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:03
Joined
Oct 29, 2018
Messages
21,467
Thank you all

I copied and pasted your statement and it now works fine! Not really sure why but much appreciated!
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Drand

Registered User.
Local time
Tomorrow, 00:03
Joined
Jun 8, 2019
Messages
179
Hi Folks

Sorry to trouble you again but this form of coding is definitely not my thing!

I have managed to add 1 tab and 2 groups so far and all is working successfully as per the following:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="dbCustomTab" label="Sales" visible="true">


<group id="dbCustomGroup" label="Sales">

<button id="RunMyMacro" label="Till Calculator" onAction="TillCalc"/>
<button id="RunMyMacro1" label="Top 10’s" onAction="Top10"/>

</group>

<group id="dbCustomGroup2" label="Sales Reports">
<button id="RunMyMacro2" label="Financial Reports" onAction="FinReports"/>
<button id="RunMyMacro3" label="Sales Comparison Reports" onAction="SalesReports"/>
<button id="RunMyMacro4" label="Weekly Results" onAction="WeeklyResults"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

I now want to continue the process with additional tabs and groups for different aspects of my project.

Would someone be kind enough to just show me how to add "tab2" to the coding with a group and I should be able to go on from there?

Also, is it possible to add icons to the group items?

Appreciate your assistance.
 

deletedT

Guest
Local time
Today, 15:03
Joined
Feb 2, 2019
Messages
1,218
You need to repeat each tab or group.
Don't forget each tab, group and control has to have its own ID.


XML:
<tabs>  
            <tab id="TAB1" >
                <group  >
                    <button />
                    <button />
                    <button />
                </group>
                <group >
                    <button />
                    <button />
                    <button />
                </group>
            </tab>
           
            <tab id="tab2">
                </group>
                    <button />
                    <button />
                    <button />
                </group>
                </group>
                    <button />
                    <button />
                    <button />
                </group>
            </tab>
           
            <tab id="tab3" >
                </group>
                    <button />
                    <button />
                    <button />
                </group>
                </group>
                    <button />
                    <button />
                    <button />
                </group>
            </tab>
        </tabs>
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:03
Joined
Oct 29, 2018
Messages
21,467
And I think the easiest way to add icons to the ribbon controls is to use the imageMso attribute.
 

Drand

Registered User.
Local time
Tomorrow, 00:03
Joined
Jun 8, 2019
Messages
179
Thank you everyone for your help.
Everything sorted now and really happy with the results!
Cheers
 

Users who are viewing this thread

Top Bottom