Adding costum icons to commandbar

  • Thread starter Thread starter Lars Roland
  • Start date Start date
L

Lars Roland

Hi. I have made a COM addin to outlook, and now i want distribute
an custom made icon with it. Can i somehow specify this in the .Style
section of my code or is there another way ??

eg. i have this code and i want to specify my own icon womewhere:

---------------------------------------------------------------
fldReportSpamButton = oStandardBar.Controls.Item("Report Spam")
If fldReportSpamButton Is Nothing Then
fldReportSpamButton = oStandardBar.Controls.Add(1)
With fldReportSpamButton
.Caption = "Report Spam"
.Style = MsoButtonStyle.msoButtonCaption
' The following items are optional, but recommended.
.Tag = "Report Spam"
.OnAction = "!<MyCOMAddin.Connect>"
.Visible = True
End With
End If
 
You can use either:
1. CommandBarButton.FaceID property, which will allow you to set one of a
couple hundred or so built-in images
2. CommandBarButton.PasteFace to paste a bitmap previously copied to the
clipboard
3. CommandBarButton.Picture and CommandBarButton.Mask properties in Outlook
2002 and up.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top