Microsoft Office Tutorials and References
In Depth Information
Creating a Commandbar for Microsoft Project
PacktMenuCmd.Caption = "Pack Microsoft Books";
PacktMenuCmd.Tag = "Tag Microsoft Books";
PacktMenuCmd.FaceId = 61;
// Click event handler for the menu item
PacktMenuCmd.Click += new Microsoft.Office.Core.
_CommandBarButtonEvents_ClickEventHandler(
menuCommand_Click);
}
}
// Add text to cell A1 when the menu is clicked.
private void menuCommand_Click(Microsoft.Office.Core.
CommandBarButton Ctrl, ref bool CancelDefault)
{
MessageBox.Show("Packt Menu Clicked");
}
The results of executing the code can be seen in the following screenshot:
Creating a Commandbar for Microsoft Project
Project
Most user interfaces for applications have a Commandbar that has buttons, menus,
and input or output control elements for user interaction with the application.
Office.CommandBar is an object in VSTO that is used to create the Commandbar
menu in the Microsoft Office 2007 application.
Commandbar for Microsoft Project
for Microsoft Project
Microsoft Project
 
Search JabSto ::




Custom Search