i have to implement onbutton click activity in ribbon callback and i have this xml.
<button id="GoToAppConfiguration" size="large" label="Application Configuration" imageMso="AutoArchiveSettings" onAction="OnActionCallback"/>
and i am using function like this in ribbon call back :
public void OnActionCallback(Office.IRibbonControl control, bool isPressed)
{
if (control.Id == "GoToAppConfiguration")
{
MessageBox.Show("You clicked " + control.Id);
}
else
{
MessageBox.Show("You clicked a different control.");
}
}
but above code is not working ..
i think control is not going to that function it self..
please help ..
Your callback method signature doesn't match what the Ribbon XML is looking for. You need to omit the second parameter isPressed
.
public void OnActionCallback(Office.IRibbonControl control)
{
if (control.Id == "GoToAppConfiguration")
{
MessageBox.Show("You clicked " + control.Id);
}
else
{
MessageBox.Show("You clicked a different control.");
}
}