CommandBar 
Author Message
 CommandBar

How can I programatically take images from either a file (.bmp) or an
ImageList control and use them as faces for a commandbar control?
Thanks, Alex


Sun, 05 Jan 2003 03:00:00 GMT  
 CommandBar

Quote:

> How can I programatically take images from either a file (.bmp) or an
> ImageList control and use them as faces for a commandbar control?
> Thanks, Alex

I don't know how.

For programatic access, I store myy custom button faces on commandbuttons
on a hidden, disabled commandbar located in either the current template
a global template or a template in a known location which I temporarily
make global with something like:
    AddIns("C:\WINDOWS\Desktop\BobsGlobal.dot").Installed = True

If "My Paste Special..." is the caption of a CommandButton on a
CommandBar named "My Custom Faces" which is located in a global
template (normal.dot for instance), then the following VBA command
will copy it's face to the clipboard. (Makes no difference if the
commandbar is enabled or hidden.)

CommandBars("My Custom Faces").Controls("My Paste Special...").CopyFace

Hope this helps,
Bob Dietz



Sun, 05 Jan 2003 03:00:00 GMT  
 CommandBar

Thanks I figured I could do it this way but I really do need to find out how
to do it with .bmps or preferably with ImageList controls.
Thanks, Alex

Quote:

> > How can I programatically take images from either a file (.bmp) or an
> > ImageList control and use them as faces for a commandbar control?
> > Thanks, Alex

> I don't know how.

> For programatic access, I store myy custom button faces on commandbuttons
> on a hidden, disabled commandbar located in either the current template
> a global template or a template in a known location which I temporarily
> make global with something like:
>     AddIns("C:\WINDOWS\Desktop\BobsGlobal.dot").Installed = True

> If "My Paste Special..." is the caption of a CommandButton on a
> CommandBar named "My Custom Faces" which is located in a global
> template (normal.dot for instance), then the following VBA command
> will copy it's face to the clipboard. (Makes no difference if the
> commandbar is enabled or hidden.)

> CommandBars("My Custom Faces").Controls("My Paste Special...").CopyFace

> Hope this helps,
> Bob Dietz



Mon, 06 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Print... from a commandbar

2. Commandbar-Popup for multiple use

3. commandbars - builtin list

4. CommandBars!CommandButton OnAction property

5. How to determine if CommandBar exists

6. CommandBar object type n/a

7. commandbars("Main Menu").Visible = True give error

8. Possible to detect mousemove over commandbars/toolbars ?

9. Error -2147467259 with Commandbar button delete

10. How to prevent customization of Commandbars

11. Dim cmb As CommandBar

12. CommandBar controls

 

 
Powered by phpBB® Forum Software