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.