Hi,
I am developing an outlook addin in c#
I need to take some custom action, when user clicks “New” button or presses “CTRL + N” instead of displaying a new mail message. As there is no onclcik event for commandbarpopup, I tried to add onAction property as follows. But when I run the addin in debug mode, I am getting exception as “Member Not Found …..”
How can I provide my own functionality on click of New (I am able to achieve this, if user clicks on any item in the dropdown list of new as they are commandbuttons and they have onclicj)
Office.CommandBarPopup cbc = (Office.CommandBarPopup)
this.Application.ActiveExplorer().CommandBars.FindControl
(Office.MsoControlType.msoControlPopup, 30037, missing, missing);
cbc.OnAction = "newMenu_Click";
public void newMenu_Click(Microsoft.Office.Core.CommandBarPopup Ctrl, ref bool CancelDefault)
{
MessageBox.Show("new button clicked............");
}
Any help is very much appreciated
I am developing an outlook addin in c#
I need to take some custom action, when user clicks “New” button or presses “CTRL + N” instead of displaying a new mail message. As there is no onclcik event for commandbarpopup, I tried to add onAction property as follows. But when I run the addin in debug mode, I am getting exception as “Member Not Found …..”
How can I provide my own functionality on click of New (I am able to achieve this, if user clicks on any item in the dropdown list of new as they are commandbuttons and they have onclicj)
Office.CommandBarPopup cbc = (Office.CommandBarPopup)
this.Application.ActiveExplorer().CommandBars.FindControl
(Office.MsoControlType.msoControlPopup, 30037, missing, missing);
cbc.OnAction = "newMenu_Click";
public void newMenu_Click(Microsoft.Office.Core.CommandBarPopup Ctrl, ref bool CancelDefault)
{
MessageBox.Show("new button clicked............");
}
Any help is very much appreciated