Group:  Microsoft Access » microsoft.public.access.modulesdaovba
Thread: How to reuse the Access 2007 ribbon buttons

Geek News

How to reuse the Access 2007 ribbon buttons
José António Silva 12/29/2008 7:53:01 PM
Is it possible to reuse the Access 2007 ribbon buttons in a new ribbon?
I know I can create a USysRibbons table to save some new ribbons. I know how
to define groups and buttons with XML. I know how to create VBA subroutines
to handle user clicks on these new ribbons. However:
1) Everything was easier if I can simply reuse some existing buttons and
groups, i.e., like in the Access 2003 command bars.
2) More important! I don’t know how to produce some “””automatic””” Access
native behaviors. For example:
a. Disable the next record button, when we are in the last record.
b. Disable the previous record button, when we are in the first record.
c. Disable the new record button, when we are filling a new record.
d. …
All this behaviors avoid some run-time errors that, otherwise, I have to
check everywhere.
Thanks!
José António Silva
Re: How to reuse the Access 2007 ribbon buttons
"Albert D. Kallal" <PleaseNOOOsPAMmkallal[ at ]msn.com> 12/30/2008 12:15:59 AM
Yes, you can pull Individual buttons, or even poll groups:

<group idMso="GroupClipboard" />
<group idMso="GroupFindAccess" />
<group idMso="GroupSortAndFilter" />


The above is quite typcial of what you need (clipboard, find,
sorting/fitler).

Here is a custom reprot ribbon of mine:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="MyReport" label="Report">

<group idMso="GroupPrintPreviewPrintAccess" />
<group idMso="GroupPageLayoutAccess" />
<group idMso="GroupZoom" />
<group idMso="GroupPrintPreviewClosePreview" />

</tab>
</tabs>
</ribbon>
</customUI>

So you're actually free to grab individual buttons, or individual groups, in
fact after awhile you build up a few of these libraries of examples, you'll
actually find this a lot easier than the old system.

To find out what is the idMso of a group (or buttion) you go:

Simply hit the office button-->access options

then choose customize from the left side

Now when you have a your mouse over any option in the list, the very last
part of that hover tip is the actual "id" you use.

[Quoted Text]
> a. Disable the next record button, when we are in the last record.
> b. Disable the previous record button, when we are in the first record.
> c. Disable the new record button, when we are filling a new record.
> d. .
> All this behaviors avoid some run-time errors that, otherwise, I have to
> check everywhere.

Golly, are you sure you don't want use the built in navigation buttons for
this? to enable, and disabled buttons requires you to use callbacks, and
it's a bit tricky.

Customizing the Office Fluent User Interface in Access 2007
http://msdn.microsoft.com/en-us/library/bb187398.aspx

and

http://www.access-freak.com/tutorials.html#Tutorial05


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal[ at ]msn.com


Re: How to reuse the Access 2007 ribbon buttons
José António Silva 12/30/2008 12:49:01 AM
It was exactly what I'm looking for. Many thanks!
José António Silva

"Albert D. Kallal" wrote:

[Quoted Text]
> Yes, you can pull Individual buttons, or even poll groups:
>
> <group idMso="GroupClipboard" />
> <group idMso="GroupFindAccess" />
> <group idMso="GroupSortAndFilter" />
>
>
> The above is quite typcial of what you need (clipboard, find,
> sorting/fitler).
>
> Here is a custom reprot ribbon of mine:
>
> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
> <ribbon startFromScratch="true">
> <tabs>
> <tab id="MyReport" label="Report">
>
> <group idMso="GroupPrintPreviewPrintAccess" />
> <group idMso="GroupPageLayoutAccess" />
> <group idMso="GroupZoom" />
> <group idMso="GroupPrintPreviewClosePreview" />
>
> </tab>
> </tabs>
> </ribbon>
> </customUI>
>
> So you're actually free to grab individual buttons, or individual groups, in
> fact after awhile you build up a few of these libraries of examples, you'll
> actually find this a lot easier than the old system.
>
> To find out what is the idMso of a group (or buttion) you go:
>
> Simply hit the office button-->access options
>
> then choose customize from the left side
>
> Now when you have a your mouse over any option in the list, the very last
> part of that hover tip is the actual "id" you use.
>
> > a. Disable the next record button, when we are in the last record.
> > b. Disable the previous record button, when we are in the first record.
> > c. Disable the new record button, when we are filling a new record.
> > d. .
> > All this behaviors avoid some run-time errors that, otherwise, I have to
> > check everywhere.
>
> Golly, are you sure you don't want use the built in navigation buttons for
> this? to enable, and disabled buttons requires you to use callbacks, and
> it's a bit tricky.
>
> Customizing the Office Fluent User Interface in Access 2007
> http://msdn.microsoft.com/en-us/library/bb187398.aspx
>
> and
>
> http://www.access-freak.com/tutorials.html#Tutorial05
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal[ at ]msn.com
>
>
>
Re: How to reuse the Access 2007 ribbon buttons
pddxxx[ at ]gmail.com 12/30/2008 10:08:46 PM
Here are some links that might help:

2007 Office System Add-In: Icons Gallery
http://www.microsoft.com/downloads/details.aspx?familyid=12b99325-93e8-4ed4-8385-74d0f7661318&displaylang=en

2007 Office System Document: Lists of Control IDs
http://www.microsoft.com/downloads/details.aspx?familyid=4329d9e9-4d11-46a5-898d-23e4f331e9ae&displaylang=en

Built-in Tab Names in Access Ribbons
http://blogs.msdn.com/access/archive/2008/12/09/built-in-tab-names-in-access-ribbons.aspx

Hope this helps,

Peter De Baets
http://www.peterssoftware.com

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net