A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Add custom icon to commandbar button



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 24th 07, 03:05 PM posted to microsoft.public.outlook.program_vba
Dhananjay
external usenet poster
 
Posts: 33
Default Add custom icon to commandbar button

Hi all,
My outlook addin is developed in VSTO using VB 2005 for office 2007.
How can I add icon to my custom commandbar button? I checked on MS
site & found one reference to this part, but my icon is shown with
blue background.

Thanks,
Dhananjay

  #2  
Old October 24th 07, 09:58 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Add custom icon to commandbar button

For buttons that aren't in WordMail Inspectors you can use separate image
files for the Picture and Mask properties of a button. For managed code you
can use AxHost for passing the IPictureDisp objects for the image files.
Make sure you follow the guidelines for image resolution and color depth.

That won't work for WordMail Inspectors. Mask and Picture take IPictureDisp
objects and those cannot be passed across process boundaries. For those you
need to look at the old KB article on creating a masked image on the
Clipboard using a color pixel at coordinate 0,0 as your mask color.
Essentially you create a mask DIB on the fly and overlay on the image DIB.
After your image is on the Clipboard you use the PasteFace method to put the
image on the button.

--
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


"Dhananjay" wrote in message
ups.com...
Hi all,
My outlook addin is developed in VSTO using VB 2005 for office 2007.
How can I add icon to my custom commandbar button? I checked on MS
site & found one reference to this part, but my icon is shown with
blue background.

Thanks,
Dhananjay


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Commandbar Button Click Handler saturn Add-ins for Outlook 1 August 7th 07 09:39 PM
Adding image to Outlook commandbar button saturn Add-ins for Outlook 3 August 3rd 07 02:13 PM
icon in outlook addin commandbar.. Joe Outlook - General Queries 1 November 28th 06 01:43 PM
Custom CommandBar in Wordmail Editor. Sanjay Add-ins for Outlook 0 May 31st 06 10:11 PM
how to add a custom button on the explorer "standard" commandbar Herve cadieu Outlook and VBA 1 March 17th 06 03:33 PM


All times are GMT +1. The time now is 12:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.