Version of Outlook?
Handling context menus is built-in with Outlook 2007, for earlier versions
you have to use a hack shown at
www.outlookcode.com to handle the
Explorer.CommandBars_OnUpdate() event. For Outlook 2007 you use whichever of
the Application context menu events that handle what you want.
You can then get the specific CommandBarButton object you want to disable
and set its Enabled property to false.
When an item is opened it fires the Inspectors.NewInspector event. So if you
handle that event you know when something is being opened. That event passes
you the Inspector to be opened and you can check for
Inspector.CurrentItem.Class to see if it's an item type you want to handle,
for example if the Class is olMail then it's a mail item.
You cannot cancel the opening of the Inspector but you can start a program
appropriately at that point. If you don't want the Inspector window there
you would have to handle Inspector events and close the Inspector on its
first Activate event. That will however cause a flash on the screen as the
Inspector window is opened and closed.
It's impossible to provide any sample code since you didn't mention your
Outlook version or the language you intend to use. You can find lots of
Outlook code samples in various languages and for various versions at
www.outlookcode.com.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Roberto GarcĂ*a" <Roberto GarcĂ*(E-Mail Removed)> wrote in message
news:C3E6F214-51BA-4D21-B959-(E-Mail Removed)...
> Hello,
>
> I'm new to the developing add ins for outlook and I need some information
> about the viability of some points. Here they are:
>
> I would like to know if it's posible to disable some elements of the right
> button menu such as Open and Delete when clicking an appoinment in the
> calendar.
> I need to know also, if it's posible, when the user doble clicks an
> appoinment, to launch an application instead of opening the edit window
> for
> the appoinment.
>
> Is there any kind of documentation where I can find some information about
> this stuff?
> I will thank any suggestion
>
> Cheers!
>