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 / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

How to load image onto CommandBarButton?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken Kee - 16 Mar 2005 15:57 GMT
I am creating a Word COM-addin using C#. I am able to load my button with
text onto the Word toolbar selection. My button is an object type of
CommandBarButton. The way I construct the button as

MyButton = (CommandBarButton) oStandardBar.Controls.Add(1, omissing ,
omissing , omissing , omissing);
MyButton.Caption = "Test Button";
MyButton.Style = MsoButtonStyle.msoButtonCaption;

Since I am relatively new in developing Word COM-addin application, the
question is: how can I modify my MyButton object to load with an image
instead of text. I was searching on MSDN for the CommandBarButton class, I
was not able to get much help.

Thanks.
Perry - 16 Mar 2005 22:36 GMT
Excel guru John Walkenbach has a neat tool with which you can select a
commandbarbutton image, also called: faceid
http://www.j-walk.com/ss/excel/tips/tip67.htm

MyButton.Caption = "Test Button";
MyButton.Style = MsoButtonStyle.msoButtonCaption;
MyButton.FaceID = [here the value of the selected by above tool]

Krgrds,
Perry

> I am creating a Word COM-addin using C#. I am able to load my button with
> text onto the Word toolbar selection. My button is an object type of
[quoted text clipped - 14 lines]
> --
> Message posted via http://www.officekb.com
Ken Kee - 17 Mar 2005 18:11 GMT
Thanks for your reply. Can I use a custom made image? How can I use it,
thanks.
 
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.