Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / June 2003

Tip: Looking for answers? Try searching our database.

Button image on toolbar

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FredGill - 30 Jun 2003 13:44 GMT
Hi,
I've created an addin that puts a button on the "standard" toolbar (see
code below) using the clipboard - as this is the only way I could get it
working. The side-effect of this is that the clipboard is cleared - is
there a better way of getting my resource bitmap as the button image?

regards
Fred

Clipboard.Clear
Clipboard.SetData LoadResPicture(IIf(ToggleEnabled, 101, 102),
vbResBitmap)  'depends on enabled or not!!!!

'Attach our button to the Standard menu bar
Set ToggleBtn =
objInsp.CommandBars("Standard").Controls.Add(Type:=msoControlButton,
Temporary:=True)
With ToggleBtn
   .Style = msoButtonIcon
   .PasteFace
   .Enabled = True
   .ToolTipText = LoadResString(150)
End With

Signature

Direct access to this group with http://web2news.com
http://web2news.com/?microsoft.public.outlook.program_addins

Dmitry Streblechenko - 30 Jun 2003 23:04 GMT
In Outlook 2002 and up, you can use the Picture and Mask properties.
Otherwise your only choice is restoring the clipboard. For a Delphi sample,
see the Babelfish addin source code on my site (uSaveClipboard.pas file).

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

> Hi,
> I've created an addin that puts a button on the "standard" toolbar (see
[quoted text clipped - 23 lines]
> Direct access to this group with http://web2news.com
> http://web2news.com/?microsoft.public.outlook.program_addins
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.