Microsoft Office Tutorials and References
In Depth Information
Menus in Outlook
if (this.PacktButtonA == null)
{
// Adding the event handler for the button in the toolbar
this.PacktButtonA = MyButton1;
PacktButtonA.Click += new Office.
_CommandBarButtonEvents_ClickEventHandler(ButtonClick);
}
}
// Button event in the custom toolbar
private void ButtonClick(Office.CommandBarButton ButtonContrl,
ref bool CancelOption)
{
// Message box displayed on button click
MessageBox.Show(ButtonContrl.Caption + " Says Hello World!");
}
The following image shows the results of adding a custom toolbar with button control:
 
Search JabSto ::




Custom Search