A: 

http://groups.google.com/group/microsoft.public.word.docmanagement/browse_thread/thread/cf55d996b3f51a06/65b2bad22e2a3583?lnk=st&q=Removing+Items+from+Word+2007 is how to do it in VBA. It is very similar using COM and probably creating a word add-in (I have not tried it though) You basically need to find the context menu control and add an item to it (your function).

jle
A: 

You need to extend the correct contextmenu. The following link describes in words (no source code) how this can be achieved:

Shared Addin using Word

Maybe this Link might help a little with the coding. I haven't tried it out myself, but it might point into the right direction.

Good luck! :)

Edit:

Does it have to be the ribbon style context menu or would a button within the normal context menu be enough? In case the normal menu would be ok, you might use this way (C#):

 Microsoft.Office.Core.CommandBar cb = this.Application.CommandBars["Text"];

 Office.CommandBarControl newButton = cb.Controls.Add(Office.MsoControlType.msoControlButton, missing, missing, missing, missing);  
 newButton.Caption = "Test";
 newButton.Visible = true;
 newButton.Enabled = true;

You can do this with VSTO, I'm not so sure if it works exactly the same way with the shared Add-In technology, but maybe it does help ;)

Marcus
+1  A: 

From MSDN -

You cannot modify the Mini toolbar programmatically.

a little over halfway down the doc. Search on mini toolbar.

Edit: The popup you have circled in the image above doesn't appear on right-click, it appears on highlight. The context menu (below the selected text) could have your custom functionality, but not in the mini toolbar.

Brandon
I get the popup on right click as well as highlight (Word 2007).
Steve Haigh
True. I didn't realize it popped up on right-click as well as highlight.
Brandon
A: 

Here is how this can be done...

            Microsoft.Office.Core.CommandBar cellbar = diff.CommandBars["Text"];
            Microsoft.Office.Core.CommandBarButton button = (Microsoft.Office.Core.CommandBarButton)cellbar.FindControl(Microsoft.Office.Core.MsoControlType.msoControlButton, 0, "MYRIGHTCLICKMENU", Missing.Value, Missing.Value);
            if (button == null)
            {
                // add the button
                button = (Microsoft.Office.Core.CommandBarButton)cellbar.Controls.Add(Microsoft.Office.Core.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 Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(MyButton_Click);
            }
Nikhil
This is exactly the way as I described it before...
Marcus
This also adds in the button in the context menu, not the mini toolbar.
Brandon
@Marcus Yes, but it adds the check to avoid duplication, otherwise you get multiple buttons, one with every new instance.@Brandon Yes, but this is the closest you can get.
Nikhil