E
Eric Crichlow
Hi all,
I'm trying to create a custom toolbar in PowerPoint.
To do this, I first call CommandBars.Add to create a new,
independent toolbar. No problem.
Next, I add a button to the toolbar by calling
CommandBar.Controls.Add. No problem.
Then I set up the button by setting various properties on it (Tag,
Caption, Style, Visible). No problem. The toolbar shows up with the
new button, which has the correct tag on it.
But I want to add a little graphic to the button, next to the tag.
Okay, CommandBarButton has a member called PasteFace, which pastes
the contents of the clipboard to the button. Works great if I use
another program to copy the desired image to the clipboard before my
VBA code pastes it to the button.
But my image is saved as a file, and I need to load in that image
and paste it to the clipboard from within my VBA code, so that the
PasteFace call will work.
And I can't figure out how to do it!
CommandBarButton doesn't have a "Picture" property which I could
just set to get the image into it. It seems that the only way to get
the image on the button is with PasteFace.
CommandButton has a "Picture" property. So maybe I could create a
CommandButton, set the image for it, copy it's face to the clipboard,
then paste that face to my CommandBarButton. Nope, CommandButton
doesn't have a CopyFace call to copy its face to the clipboard.
So how do I set the image in a CommandBarButton from a file?
....Thanx...
....Eric...
I'm trying to create a custom toolbar in PowerPoint.
To do this, I first call CommandBars.Add to create a new,
independent toolbar. No problem.
Next, I add a button to the toolbar by calling
CommandBar.Controls.Add. No problem.
Then I set up the button by setting various properties on it (Tag,
Caption, Style, Visible). No problem. The toolbar shows up with the
new button, which has the correct tag on it.
But I want to add a little graphic to the button, next to the tag.
Okay, CommandBarButton has a member called PasteFace, which pastes
the contents of the clipboard to the button. Works great if I use
another program to copy the desired image to the clipboard before my
VBA code pastes it to the button.
But my image is saved as a file, and I need to load in that image
and paste it to the clipboard from within my VBA code, so that the
PasteFace call will work.
And I can't figure out how to do it!
CommandBarButton doesn't have a "Picture" property which I could
just set to get the image into it. It seems that the only way to get
the image on the button is with PasteFace.
CommandButton has a "Picture" property. So maybe I could create a
CommandButton, set the image for it, copy it's face to the clipboard,
then paste that face to my CommandBarButton. Nope, CommandButton
doesn't have a CopyFace call to copy its face to the clipboard.
So how do I set the image in a CommandBarButton from a file?
....Thanx...
....Eric...