customization of right click context menu is possible with word 2007. Following is the code
Microsoft.Office.Interop.Word.Application app;
app = (Microsoft.Office.Interop.Word.Application)applicationObject;
CommandBar cellbar = app.CommandBars["Text"];
CommandBarButton button = (CommandBarButton)cellbar.FindControl(MsoControlType.msoControlButton, 0, "MYRIGHTCLICKMENU", Missing.Value, Missing.Value);
if (button == null)
{
// add the button
button = (CommandBarButton)cellbar.Controls.Add(MsoControlType.msoControlButton, Missing.Value, Missing.Value, cellbar.Controls.Count + 1, true);
button.Caption = "My Right Click Menu Item";
button.BeginGroup = true;
button.Tag = "MYRIGHTCLICKMENU";
button.Click += new _CommandBarButtonEvents_ClickEventHandler(button_Click);
}
//handler for the button click
private void MyButton_Click(CommandBarButton cmdBarbutton, ref bool cancel)
{
System.Windows.Forms.MessageBox.Show("MyButton was Clicked", "MyCOMAddin");
}
I hope you can get this working..
Cheers
Rajshree Dugar