Hello,
I successfully display an add-in menu. However,
when I try to hook the message item to the event
handler, I receive this compiler error message:
(291): Method 'MyAddIn.Connect.MenuItem_Click
(Office.CommandBarButton, ref bool)' does not match
delegate 'void
Microsoft.Office.Core._CommandBarButtonEvents_Clic kEventHan
dler(Microsoft.Office.Core.CommandBarButton, ref bool)'
// myAddin code
private Office.CommandBarButton MenuItem = null;
private void MenuItem_Click(Office.CommandBarButton Ctrl,
ref Boolean CancelDefault)
{
MessageBox.Show("BC Menu Item");
}
MenuItem.Click += new
Microsoft.Office.Core.
_CommandBarButtonEvents_ClickEventHandler(MenuItem _Click);
Any ideas?
TIA,
BC