Outlook 2007 Context Menus

M

Mark Wilson

If my InBox is sorted by date there are groups of items listed with labels
like "Date: Last Week" or "Date: Earlier This Month".

If I right click one of these group labels, I get a context menu popping up.
However its creation doesn't trigger any of the six ContextMenuDisplay
events, and when it closes it doesn't trigger the ContextMenuClose event.

What is this context menu called, and how do you determine what the
ControlID values are for the items on this menu?
 
C

Colbert Zhou [MSFT]

Unfortunately, as far as I know, the Items' Group context menu event is not
included in the Outlook Object Model. That is to say, currently that
context menu is not supported to be customized.

An unsupported workaround could be CommandBars.OnUpdate event.(This is
usually used in Outlook 2003 because 2003 version does not support the six
ContextMenuDisplay event). But in that case, we do not get the menu context
in the event handle either. In Outlook 2003, we use "Context Menu" to
identify that context menu. Here is a VBA sample,
http://www.outlookcode.com/codedetail.aspx?id=314

Although I mention this workaround, but as its not documented and not
supported. I suggest not to do this unless we must.


Best regards,
Ji Zhou
Microsoft Online Community Support
 
K

Ken Slovak - [MVP - Outlook]

A major limitation on the OnUpdate() hacks are that you don't get any
reference as to where the right-click occurred. It could be on a selected or
non-selected item, it could be in the navigation pane or somewhere else,
etc. So you'd have no way of knowing if the r-click was on a grouping header
or somewhere else and if on a header which one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top