Novice: Adding a menu to current menu?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Thanks for reviewing my question. I am just starting out and so I am not
sure if this is possible but I would like to know if you can add to an
existing context-sensitive menu.

When you are in Outlook and have your list of emails in front of you, you
can right click on an email and menu (Open, Print, Reply, Forward, etc.) is
displayed. I would like to know if its possible to add my own menu item to
this menu? And of course if true, how do you go about doing this?

Many Thanks
Peter
 
It's possible as a hack that mostly works (it's supported fully in Outlook
2007), but the hack doesn't tell you what was right-clicked on. You can use
Explorer.Selection to tell what was selected in the view but that may not be
the same as the item the user right-clicked on.

See http://www.outlookcode.com/codedetail.aspx?id=526 for an example.
 
Ken,

Thanks for the helpfull info.

I am actually trying out the Outlook 2007. Where can I find out on how to
do it in Outlook 2007?

Thanks
Peter
 
Trap the Application.OnItemContextMenuDisplay. In your implementation of the
OnItemContextMenuDisplay event handler, add your button to the command bar
passed in the CmdBar parameter.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
And whatever was right-clicked or the selection that was right-clicked will
be in the Selection collection passed in that event. All context menus share
the ContextMenuClose event, so you also know when the context menu is
closing.
 
Back
Top