![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I have wrtten Outlook COM Add-in. The attached code on startup creates the button on outlook tool bar and assign the icon C:\local\cat.bmp. Could anyone please tell me how could I make my Add-in independent of C:\local\cat.bmp? I mean can I put picture somewhere in add-in itself so that while installing on other machine it should have any problem if C:\local\cat.bmp is not there. OR How could I use any system icon? Set moCBMeow = moApp.ActiveExplorer.CommandBars.Item("Standard"). FindControl(, , "890", False, True) If TypeName(moCBMeow) = "Nothing" Then Set moCBMeow = moApp.ActiveExplorer.CommandBars.Item("Standard"). Controls.Add(msoControlButton, , "890", , True) End If With moCBMeow .BeginGroup = True .Caption = "Copylink" .DescriptionText = "Meow meow meow" .Enabled = True .OnAction = "!CopyLinkTestingAddin.Connect" Clipboard.Clear Clipboard.SetData LoadPicture("c:\local\cat.bmp") .PasteFace .Style = msoButtonIconAndCaption .Tag = "890" .ToolTipText = "Meow meow meow" .Visible = True End With Thanks. Paresh |
Ads |
#2
|
|||
|
|||
![]()
Any image supplied for a CommandBarButton object must be 16x16x256 colors.
If put on the clipboard it must be a BMP, if you use Picture/Mask you supply an IPictureDisp object. To re-use an Outlook button image you get the CommandBarButton with the image you want and use CopyFace to put it on the clipboard for PasteFace to grab. For any other image you can put it in the resource file for your addin project and grab it from there, using whatever method is available in the language you are using for loading image resources. -- 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 "paresh" wrote in message ... Hi, I have wrtten Outlook COM Add-in. The attached code on startup creates the button on outlook tool bar and assign the icon C:\local\cat.bmp. Could anyone please tell me how could I make my Add-in independent of C:\local\cat.bmp? I mean can I put picture somewhere in add-in itself so that while installing on other machine it should have any problem if C:\local\cat.bmp is not there. OR How could I use any system icon? Set moCBMeow = moApp.ActiveExplorer.CommandBars.Item("Standard"). FindControl(, , "890", False, True) If TypeName(moCBMeow) = "Nothing" Then Set moCBMeow = moApp.ActiveExplorer.CommandBars.Item("Standard"). Controls.Add(msoControlButton, , "890", , True) End If With moCBMeow .BeginGroup = True .Caption = "Copylink" .DescriptionText = "Meow meow meow" .Enabled = True .OnAction = "!CopyLinkTestingAddin.Connect" Clipboard.Clear Clipboard.SetData LoadPicture("c:\local\cat.bmp") .PasteFace .Style = msoButtonIconAndCaption .Tag = "890" .ToolTipText = "Meow meow meow" .Visible = True End With Thanks. Paresh |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003 - custom forms - task assign button dissappears | formation | Outlook - Using Forms | 3 | February 20th 09 03:24 PM |
Adding an icon to outlook commandbar button | Exchnerd | Add-ins for Outlook | 1 | November 6th 08 09:28 PM |
Custom Task Form - Assign Button | steve | Outlook - Using Forms | 1 | July 8th 07 07:36 PM |
assign macro to custom toolbar button | Rod Nolan | Outlook and VBA | 1 | September 7th 06 05:34 AM |
Simple assign category button | caero | Outlook and VBA | 15 | March 14th 06 03:35 PM |