| Code level: advanced Code area: Outlook Expert Techniques Printer Friendly Version | ||
| Title: How to add context menu buttons | ||
| Description: Exposes the right-click context menu in an Explorer window so a new button can be added | ||
| Date: 11-Feb-2004 09:06 | ||
| Code level: advanced | ||
| Code area: Outlook Expert Techniques | ||
| Posted by: Richard Kagerer | ||
| Body: |
||
| All 74comments |
| Page [ 1 2 3 4 5 6 7 8 Next >> ] | ||
|
|
totalidea
16-Feb-2004 13:48
Brilliant. Thanks for that. There's no way to add my own icon to the new menu button, eh? |
|
|
|
Dixon Benny
24-Feb-2004 00:13
Very usefull one. Thanks a lot |
|
|
|
mjansen
04-Mar-2004 01:56
When I right click for the first time (after startup) I have this extra item in my context menu which is great. When I click a second time the new item is gone. How can I change the code so that the new Item does not dissapear. I 'have not been able to figure it ou yet (it is difficult to debug the code because of the onupdate event). |
|
|
|
Richard Kagerer
15-Mar-2004 16:29
totalidea: If you mean adding your own image, there's no method that I am aware of. If you're really keen, you might be able to use custom API calls and subclassing to get more low-level "windows-like" access to the toolbar, but that's beyond the scope of this article. mjansen: I double checked the example and it works here. Make sure you run the Install() sub. Also, I tested on Outlook 2002 SP-2; double check your version. Are you performing any other Outlook actions in between the clicks? |
|
|
|
mjansen
17-Mar-2004 01:53
I use Outlook 2000, maybe that's why it does not work. The install part does run ok and I do have an extra option in the context menu the first time but after calling it once ist dissapears. |
|
|
|
ddzina
17-Mar-2004 16:59
How do you determine what the item was that had been right clicked? |
|
|
|
Sue Mosher
18-Mar-2004 08:41
The currently selected item(s) should be in the ActiveExplorer.Selection collection. |
|
|
|
Arbiel
30-Mar-2004 02:21
I'm also using Outlook 2000 and experiencing the same difficulty as mjansen : the button only appears at the first occurence of the right click. I've made some debugging to find out that its priority has been dropped (IsPriorityDropped = True), even if the priority is set to 1. |
|
|
|
Arbiel
30-Mar-2004 02:33
Eureka : add a "bar.reset" command before adding the button New code : If Not bar Is Nothing Then bar.reset AddContextButton bar End If |
|
|
|
Arbiel
30-Mar-2004 02:55
Be careful. I might have a little over-estimated my skills. After having switched to another folder in the same explorer, the right click sends Outlook down. I don't know yet why, and I don't have presently enough time to investigate. |
|
| Page [ 1 2 3 4 5 6 7 8 Next >> ] | ||
| Post your comment name email |
