WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Customising the Ribbon in 2007

 
   Home -> Office other -> General Discussions RSS
Next:  General Discussions: Is it possible to snd SMS's in a group from an access appl..  
Author Message
Nigel

External


Since: Mar 24, 2006
Posts: 57



(Msg. 1) Posted: Fri Jul 04, 2008 5:25 am
Post subject: Customising the Ribbon in 2007 Add to elertz
Archived from groups: microsoft>public>access (more info?)

Is there a way/how do I do it to customise the ribbon in Access 2007, as you
can it previous vewrsions to customise toolbars and menus.

Thanks
Back to top
Login to vote
Albert D. Kallal

External


Since: May 04, 2005
Posts: 1445



(Msg. 2) Posted: Fri Jul 04, 2008 9:25 am
Post subject: Re: Customising the Ribbon in 2007 Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It is a little more work then before, but once you learn how do change the
ribbon, you find it quite easy to change it...

here is some links:

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


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



--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal DeleteThis @msn.com
Back to top
Login to vote
Nigel

External


Since: Mar 24, 2006
Posts: 57



(Msg. 3) Posted: Fri Jul 04, 2008 9:25 am
Post subject: Re: Customising the Ribbon in 2007 Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Albert

Many thanks for your reply, will certainly give it a go!

Nigel

"Albert D. Kallal" wrote:

> It is a little more work then before, but once you learn how do change the
> ribbon, you find it quite easy to change it...
>
> here is some links:
>
> Customizing the Office Fluent User Interface in Access 2007
> http://msdn.microsoft.com/en-us/library/bb187398.aspx
>
>
> http://www.access-freak.com/tutorials.html#Tutorial05
>
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal.TakeThisOut@msn.com
>
>
>
Back to top
Login to vote
Paul

External


Since: Mar 21, 2006
Posts: 129



(Msg. 4) Posted: Fri Jul 04, 2008 12:28 pm
Post subject: Re: Customising the Ribbon in 2007 Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Albert,

I saw this post and it looked like just what I needed:
http://msdn.microsoft.com/en-us/library/bb187398.aspx

I just can't get it to work.

Function BR_GetImages(control As IRibbonControl, ByRef image)
Static frmRibbonImages As Form_USysRibbonImages
Static rsForm As DAO.Recordset2

If frmRibbonImages Is Nothing Then
DoCmd.OpenForm "USysRibbonImages", WindowMode:=acHidden
Set frmRibbonImages = Forms("USysRibbonImages")
Set rsForm = frmRibbonImages.RecordsetClone
End If

rsForm.FindFirst "ControlID='" & control.Id & "'"
If rsForm.NoMatch Then
' No image found
Set image = Nothing
Else
Set image = frmRibbonImages.Images.PictureDisp
End If
End Function

I keep getting an Invalid Picture error on
Set image = frmRibbonImages.Images.PictureDisp

When I dig (and it has been some time) into this I don't understand how it
could ever work. I must be missing something? Images is an Attachment control
on the USysRibbonImages form, as far I can tell the Attachment object has no
member PictureDisp?

Any direction would be greatly appreciated.
Thanks!
Paul



"Nigel" wrote:

> Hi Albert
>
> Many thanks for your reply, will certainly give it a go!
>
> Nigel
>
> "Albert D. Kallal" wrote:
>
> > It is a little more work then before, but once you learn how do change the
> > ribbon, you find it quite easy to change it...
> >
> > here is some links:
> >
> > Customizing the Office Fluent User Interface in Access 2007
> > http://msdn.microsoft.com/en-us/library/bb187398.aspx
> >
> >
> > http://www.access-freak.com/tutorials.html#Tutorial05
> >
> >
> >
> > --
> > Albert D. Kallal (Access MVP)
> > Edmonton, Alberta Canada
> > pleaseNOOSpamKallal.DeleteThis@msn.com
> >
> >
> >
Back to top
Login to vote
Albert D. Kallal

External


Since: May 04, 2005
Posts: 1445



(Msg. 5) Posted: Fri Jul 04, 2008 5:23 pm
Post subject: Re: Customising the Ribbon in 2007 Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I do not like that example at all..

The logic simply means you are opening a form in hidden mode, and the MOVING
THE RECORD to the correct position (and, the form will then display the
image from the recordset in an image control..and then you grab that image
from the form, and then close the form. Hardly a reasonable way to get a
simple image in a production environment. When I think about this, it means
that a ribbon to display one little image for a button would be opening a
WHOLE form to grab *ONE* simple image.

(I guess I saying I really don't like that code example one bit).

> Set rsForm = frmRibbonImages.RecordsetClone

You can't use the RecordSetClone, you MUST use RecordSet. Remember,
reocrdsetclone moves independent of the form. When you use recordset, then
when you do a move/find etc, then the form actually MOVES WITH your
reocrdset. The example code has the above written as reocrdset, and NOT
recordsetclone. The reason for this is you MUST MOVE the form to the correct
record so the form can "render" the image on a image control on that form
(then your code is then going go "pluck" that image from the image control
on
the form).

> When I dig (and it has been some time) into this I don't understand how it
> could ever work. I must be missing something? Images is an Attachment
> control
> on the USysRibbonImages form, as far I can tell the Attachment object has
> no
> member PictureDisp?

I not looked, but if you don't have a image on the form, then you have to
add it...

>
> Any direction would be greatly appreciated.

I would suggest that you consider placing the images in a directory
(relative) to your application. Or, we come up with a way to pull the image
directly out of a table. It just seem so kluge to launch a whole form and
then start navigating records in that form to the correct record to display
a
simple image for ONE control on a ribbon.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal.TakeThisOut@msn.com
Back to top
Login to vote
Paul

External


Since: Mar 21, 2006
Posts: 129



(Msg. 6) Posted: Sat Jul 05, 2008 8:38 am
Post subject: Re: Customising the Ribbon in 2007 Add to elertz [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Albert, thank you so much for looking at this, I desperately need help.


"Albert D. Kallal" wrote:

> I do not like that example at all..
>
> The logic simply means you are opening a form in hidden mode, and the MOVING
> THE RECORD to the correct position (and, the form will then display the
> image from the recordset in an image control..and then you grab that image
> from the form, and then close the form. Hardly a reasonable way to get a
> simple image in a production environment. When I think about this, it means
> that a ribbon to display one little image for a button would be opening a
> WHOLE form to grab *ONE* simple image.
>
> (I guess I saying I really don't like that code example one bit).
I couldn't agree with you more, but judging from its source, I have to
believe it at least works. Can you please explain how as developers we are
supposed to figure out how to load custom images if Microsoft provides
examples that don't work, I am mistified by this??? If nothing else, this
ribbon allows (apparently) you to load custom images, how is it done? I've
been scouring the internet and the best I can come up with is;

http://www.accessribbon.de/en/index.php?Access_-_Ribbons:User_Defined_...ns___Pi

The only way I can that to work is to use their LoadPictureGDIP method, it
will not work with the LoadPicture method? Moreover I was required to load
their basGDIP module which contains code with foreign language comments and
prompts, not really keen on doing that.

>
> > Set rsForm = frmRibbonImages.RecordsetClone
>
> You can't use the RecordSetClone, you MUST use RecordSet. Remember,
> reocrdsetclone moves independent of the form. When you use recordset, then
> when you do a move/find etc, then the form actually MOVES WITH your
> reocrdset. The example code has the above written as reocrdset, and NOT
> recordsetclone. The reason for this is you MUST MOVE the form to the correct
> record so the form can "render" the image on a image control on that form
> (then your code is then going go "pluck" that image from the image control
> on
> the form).
I agree and understand. Being desperate to get this to work, I was just
trying anything and this happened to be the version I cut and pasted in the
post, sorry about that. Just to be clear, it still does not work using the
recordset.
>
> > When I dig (and it has been some time) into this I don't understand how it
> > could ever work. I must be missing something? Images is an Attachment
> > control
> > on the USysRibbonImages form, as far I can tell the Attachment object has
> > no
> > member PictureDisp?
>
> I not looked, but if you don't have a image on the form, then you have to
> add it...
Sorry I don't understand this comment. What is PictureDisp and what is its
parent object?
>
> >
> > Any direction would be greatly appreciated.
>
> I would suggest that you consider placing the images in a directory
> (relative) to your application. Or, we come up with a way to pull the image
> directly out of a table. It just seem so kluge to launch a whole form and
> then start navigating records in that form to the correct record to display
> a
> simple image for ONE control on a ribbon.
>

As I am writing this reply I am trying different things and I just had an
epiphany. I created my images (icons) with the A channel enabled (for
tranparency). This is why LoadPicture keeps saying 'Invalid Picture' Smile
So I created one icon without the A channel to test this. Sure enough, no
error, but sadly the image did not show up in the ribbon? Solve one problem
and encounter another, the saga goes on Sad

Here is what I did get to this to work (not pretty):

Since the only way I can get my icons to load is to use the LoadPictureGDIP
method (not comfortable with this), I loaded the images in a table
attachment. When its time to load the ribbon, I copy the image from the table
to a file and use the LoadPictureGDIP method. This works, but seems like
another kluge, take it from a file, save it as an attachment in a table, read
the table and copy it back to file, read it and transfer to button. As you
said 'just to load one image in a button'.

There must be a better way, here the criteria:
1- Need to handle tranparency, otherwise the ribbon looks like hell. PNG
seems to be the best format.
2- Need to be able to store the images in a table. This makes so much sense;
-installation and maintnenance is greatly simplified
-no one can 'steal' your images

Thanks again and standing by.
Paul



>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal.TakeThisOut@msn.com
>
>
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET