Adding custom context menu items to an Outlook MailItem using Outlook 2007 VSTO 3.0

Posted by cbass on Stack Overflow See other posts from Stack Overflow or by cbass
Published on 2010-04-23T17:40:18Z Indexed on 2010/04/23 17:43 UTC
Read the original article Hit count: 357

Hi I've been trying to figure out how to create a context menu in VSTO 2007. I'm hoping that is possible.

When I make this call.

Dim commandBar As Microsoft.Office.Core.CommandBar = _word.CommandBars("Text")

I get the following error.

This object model command is not available in e-mail.

I've look all over and from what I can tell it's not possible to add to the context menu in Office 2007. This doesn't seem right.

I've also tried this event without any luck since it isn't being fired when right clicking on the MailItem

ItemContextMenuDisplay(ByVal commandBar As Microsoft.Office.Core.CommandBar, ByVal selection As Microsoft.Office.Interop.Outlook.Selection)

Hoping that someone can help.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about vsto

Related posts about outlook-2007