Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Adding a custom picture to command bar button

Geek News

Adding a custom picture to command bar button
Andrew 10/17/2008 1:58:01 PM
Anyone has any idea on how to a add a custom picture/icon to a command bar
button?

Thanks,
Andrew
RE: Adding a custom picture to command bar button
Andrew 10/17/2008 2:02:00 PM
This is in Visual Studio 2005 SE/2008, language is VB

"Andrew" wrote:

[Quoted Text]
> Anyone has any idea on how to a add a custom picture/icon to a command bar
> button?
>
> Thanks,
> Andrew
Re: Adding a custom picture to command bar button
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 10/17/2008 3:57:05 PM
Outlook version?

If 2003 or 2002 you can use the Picture and Mask properties of the
CommandBarButton object and pass IPictureDisp objects, except in cases of
WordMail, where you can't pass an IPictureDisp across process boundaries.

If 2000 or for WordMail you must use PasteFace, which pastes an image that
meets the button image specs that's on the Clipboard. You must put the image
you want on the Clipboard yourself before calling PasteFace.

For 2007 you only want to use the CommandBar interfaces with Explorer
buttons, where you can use Picture and Mask with IPictureDisp images.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Andrew" <Andrew[ at ]discussions.microsoft.com> wrote in message
news:9B79AB31-4DA9-4949-BABC-737B2AD401FC[ at ]microsoft.com...
[Quoted Text]
> This is in Visual Studio 2005 SE/2008, language is VB
>
> "Andrew" wrote:
>
>> Anyone has any idea on how to a add a custom picture/icon to a command
>> bar
>> button?
>>
>> Thanks,
>> Andrew

Re: Adding a custom picture to command bar button
Andrew 10/17/2008 5:14:01 PM
Thanks, I'm going to try it out and see how it works.

"Ken Slovak - [MVP - Outlook]" wrote:

[Quoted Text]
> Outlook version?
>
> If 2003 or 2002 you can use the Picture and Mask properties of the
> CommandBarButton object and pass IPictureDisp objects, except in cases of
> WordMail, where you can't pass an IPictureDisp across process boundaries.
>
> If 2000 or for WordMail you must use PasteFace, which pastes an image that
> meets the button image specs that's on the Clipboard. You must put the image
> you want on the Clipboard yourself before calling PasteFace.
>
> For 2007 you only want to use the CommandBar interfaces with Explorer
> buttons, where you can use Picture and Mask with IPictureDisp images.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Andrew" <Andrew[ at ]discussions.microsoft.com> wrote in message
> news:9B79AB31-4DA9-4949-BABC-737B2AD401FC[ at ]microsoft.com...
> > This is in Visual Studio 2005 SE/2008, language is VB
> >
> > "Andrew" wrote:
> >
> >> Anyone has any idea on how to a add a custom picture/icon to a command
> >> bar
> >> button?
> >>
> >> Thanks,
> >> Andrew
>
>

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