A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

adding a context menu in Outlook



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 19th 06, 02:09 PM posted to microsoft.public.outlook.program_addins
donald
external usenet poster
 
Posts: 25
Default adding a context menu in Outlook

Hi there,

How can i add a button to the Right-mouse context menu in Outlook?

Thanks

Donald

  #2  
Old March 19th 06, 05:21 PM posted to microsoft.public.outlook.program_addins
Rog
external usenet poster
 
Posts: 62
Default adding a context menu in Outlook

Hi Donaly you need to attach to the the CommandBars.OnUpdate event look
for the this._explorer.CommandBars["Context Menu"];
This will be the command bar you then need to add your buttons to.
Rog





donald wrote:
Hi there,

How can i add a button to the Right-mouse context menu in Outlook?

Thanks

Donald

  #3  
Old March 19th 06, 06:15 PM posted to microsoft.public.outlook.program_addins
donald
external usenet poster
 
Posts: 25
Default adding a context menu in Outlook

thanks Rog

that work just lovely

  #4  
Old April 17th 06, 11:44 AM posted to microsoft.public.outlook.program_addins
Adi
external usenet poster
 
Posts: 9
Default adding a context menu in Outlook

Hi,

I tried to initialise the Context menu during startup. But it does not show
up.
Is there anything i missed?

Or should i initialise the Context menu on CommandBar.update ?

thanks

"donald" wrote:

thanks Rog

that work just lovely


  #5  
Old April 17th 06, 02:44 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default adding a context menu in Outlook

Use the .Update event.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Adi" wrote in message
...
Hi,

I tried to initialise the Context menu during startup. But it does not
show
up.
Is there anything i missed?

Or should i initialise the Context menu on CommandBar.update ?

thanks


  #6  
Old May 3rd 06, 01:47 AM posted to microsoft.public.outlook.program_addins
Adi
external usenet poster
 
Posts: 9
Default adding a context menu in Outlook

Hi,

It still does not work.
And i think it should be .OnUpdate and not .Update as there is no such event
for COmmandBars.

I am pasting my code here. Please help me out.

OnStartupComplete()

{

.........
.......

_CommandBarsEvents_OnUpdateEventHandler oUpdate = new
_CommandBarsEvents_OnUpdateEventHandler(onUpdate);
this.commandBars.OnUpdate += oUpdate;

.......
}
public void onUpdate()
{

try
{
this.toolbarButton2 =
(CommandBarButton)this.commandBars["Context"].Controls["Up"];

}
catch (Exception e)
{
this.toolbarButton2 =
(Microsoft.Office.Core.CommandBarButton)this.comma ndBars["Context"].Controls.Add(MsoControlType.msoControlButton,
System.Reflection.Missing.Value, System.Reflection.Missing.Value,
System.Reflection.Missing.Value, System.Reflection.Missing.Value);
this.toolbarButton2.Caption = "Up";
this.toolbarButton2.Style =
Microsoft.Office.Core.MsoButtonStyle.msoButtonAuto matic;
}

this.toolbarButton2.Tag = "Up";
this.toolbarButton2.Visible = true;
this.toolbarButton2.Priority = 1;
this.toolbarButton2.Enabled = true;


}

Am i missing something?


"Ken Slovak - [MVP - Outlook]" wrote:

Use the .Update event.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Adi" wrote in message
...
Hi,

I tried to initialise the Context menu during startup. But it does not
show
up.
Is there anything i missed?

Or should i initialise the Context menu on CommandBar.update ?

thanks



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 'Import and Export' missing from Files menu Spailpin Outlook - Installation 2 March 18th 06 07:13 PM
How do I add a new option in the context menu(Outlook)? Outllok - context menus aad ins Outlook - Using Forms 5 March 16th 06 03:47 PM
custom menu command Melissa m Outlook - Using Contacts 1 February 27th 06 08:27 PM
Adding Outlook Express to my start menu MP Boettger Outlook - General Queries 1 February 22nd 06 06:45 PM
Context Menu not present Mono Outlook Express 5 February 7th 06 07:22 PM


All times are GMT +1. The time now is 06:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.