Context Menu

A

Alex Ionescu

Hello everyone,

I'm developping an add-in that, among other things, will add a new item to
the context menu (when you right-click on a message).
I've noticed that the menu is only created after the user first right-clicks
on a message. No problem, since I'm subclassing OE anyways for another
function of the addin.
I am sucesful in using Set objCB = objExpl.CommandBars.Item("Context Menu")
and if I set a watch on objCB I can see all the items of the Context Menu.
However, should I try to add, modify, remove or change any single setting of
any item on the context menu, Outlook returns a failure. Did Microsoft
disable this? Any way around it? And when I ask any way.... I mean any
way...I've already created a button with createwindowex that I've attached
to a subclassed toolbar (so I can have a picture over 16x16) so I'm not
afraid to do some crazy hacking with the menu to make it do what I want it.

Thanks everyone for your suggestions,
Alex Ionescu
 
S

Sumit Kalra

Hi Alex Ionescu,

Seen your message at Microsoft Newsgroup. Sorry, I can't
help you as I
haven't tried that. And Sorry, I am taking your precious
time. But, I
thought you can help me out. Please let me know if you
have any solution or
suggestion.

My problem
is that I want to add a Popup type button with Image,
anyhow. I got three solutions, but each has having
problem.

Ist Soluion:
Adding a normal button (ControlButton) with image and
popup button without caption (to look like popup control
with image). Problem with this, Popupwithout caption
removes the drop down arrow image from control. It doesn't
show anything till you move cursor on it. Means its still
not perfect.

IInd Solution:
Making a msoPopup type CommandBar. Having a normal
controlbutton and showing popup commandbar on its click
(by showpopup). Works fine and shows the popup below the
normal button to give it a look of Popup with image. But
problem with this, submenu item click doens't work. Popup
menu item doesn't allow to trace click event.

IIIrd Solution:
Using "New" button ID (858 I think) to make the new
msoPopupControl. It shows the popup perfectly with image
and on click of drop down it shows sub menu. Perfect.
Problem with this, its click works like "New Button". It
image changes as "New" button. Means the functionality of
drop down is perfect but default button click is replica
of New button.

What I want is a simple popup button with image. I don't
want default button functionality (not urgent). Please
help fast. I am running out of time.

Thanks in advance.

Regards,
Sumit
-----Original Message-----
Hello everyone,

I'm developping an add-in that, among other things, will add a new item to
the context menu (when you right-click on a message).
I've noticed that the menu is only created after the user first right-clicks
on a message. No problem, since I'm subclassing OE anyways for another
function of the addin.
I am sucesful in using Set objCB =
objExpl.CommandBars.Item("Context Menu")
 

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

Similar Threads

Outlook 2010 context menu changes 3
Context Menu on items 15
Context menu 4
Context Menu Question 21
Get context of context menu 1
Context menu for new message window 7
Context Menu [only] 1
Context menu selection 1

Top