Adding Menu item to the Mail item menu from an outlook Addin 
Author Message
 Adding Menu item to the Mail item menu from an outlook Addin

Hi guys n gals

I thought i might cross-post this one as it seems relevant to all....

I have an outlook addin in which i have added some menu items , trap events
etc. However what I now need to do is to add a menu item to the standard
'file' menu when any mail item is opened (new or exisitng). I am talking
about the menu within the mail window.

I was looking at using the withevents on the inpectors object but dont seem
to be able to get anywhere.

How do I go about this? Any help would be appreciated.

Regards
Jeff
perth western australia



Sat, 30 Jul 2005 14:07:29 GMT  
 Adding Menu item to the Mail item menu from an outlook Addin
Jeff I have the same issue
I have an Outlook Addin that needs to add a button to be launched to a new
mail message, the way I do it is to
create a new mail message so that it becomes the activeexplorer then add the
button on and close the message Whilst this can work this is a huge hack. It
seems as the commandbars are only available from
activeexplorer/activeinspector, so you have to have one of these to access
it. Obviously Outlook doesnt have this limitation and has registry keys to
support this. But there must be a better way, as this way can get into
trouble if there is a disable macro dialogue box being displayed for
instance

If anyone can help much appreciated

Code
Set objAppInstance = Application
 'this is hacky, but cant find anyother way to do it
 Set objMessage = Application.CreateItem(olMailItem)
objMessage.Display
   Set MyButton =
Application.ActiveExplorer.CommandBars("standard").Controls.Add() '(1)


Quote:
> Hi guys n gals

> I thought i might cross-post this one as it seems relevant to all....

> I have an outlook addin in which i have added some menu items , trap
events
> etc. However what I now need to do is to add a menu item to the standard
> 'file' menu when any mail item is opened (new or exisitng). I am talking
> about the menu within the mail window.

> I was looking at using the withevents on the inpectors object but dont
seem
> to be able to get anywhere.

> How do I go about this? Any help would be appreciated.

> Regards
> Jeff
> perth western australia



Sun, 31 Jul 2005 21:26:08 GMT  
 Adding Menu item to the Mail item menu from an outlook Addin
If you have concerns about users having Macros disabled, you can implement
your solution as a COM Add-In.  As for the CommandBars collection, yet, you
need to have an Inspector or Explorer object in order to access it, but that
should never be a problem.  There's always an ActiveExplorer - the main
Outlook interface itself.  If what you want is to add a custom menu/toolbar
item to every new Inspector, see my other post in this thread.

--
Eric Legault, MCSD
ADAPSYS - http://www.adapsys.ca


Quote:
> Jeff I have the same issue
> I have an Outlook Addin that needs to add a button to be launched to a new
> mail message, the way I do it is to
> create a new mail message so that it becomes the activeexplorer then add
the
> button on and close the message Whilst this can work this is a huge hack.
It
> seems as the commandbars are only available from
> activeexplorer/activeinspector, so you have to have one of these to access
> it. Obviously Outlook doesnt have this limitation and has registry keys to
> support this. But there must be a better way, as this way can get into
> trouble if there is a disable macro dialogue box being displayed for
> instance

> If anyone can help much appreciated

> Code
> Set objAppInstance = Application
>  'this is hacky, but cant find anyother way to do it
>  Set objMessage = Application.CreateItem(olMailItem)
> objMessage.Display
>    Set MyButton =
> Application.ActiveExplorer.CommandBars("standard").Controls.Add() '(1)



> > Hi guys n gals

> > I thought i might cross-post this one as it seems relevant to all....

> > I have an outlook addin in which i have added some menu items , trap
> events
> > etc. However what I now need to do is to add a menu item to the standard
> > 'file' menu when any mail item is opened (new or exisitng). I am talking
> > about the menu within the mail window.

> > I was looking at using the withevents on the inpectors object but dont
> seem
> > to be able to get anywhere.

> > How do I go about this? Any help would be appreciated.

> > Regards
> > Jeff
> > perth western australia



Sun, 07 Aug 2005 06:09:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Adding Menu item to the Mail item menu from an outlook Addin

2. Add (first) menu items at runtime, then (second) subitems to newly create items

3. Howto add a menu to right-click menu for an item

4. Adding Menu Item to Inspector Menu

5. When adding second menu item to custom menu it appears greyed out

6. catching menu clicks and adding menu items

7. Add Menu Item to Main Word Menu

8. Adding Menu Item To FILE MANAGER Menu

9. Adding Menu Items to App's System Menu using VB5.0

10. Adding custom menu items to explorer menu

11. Adding custom menu items to explorer menu

12. Adding a menu item to a popup menu dynamically

 

 
Powered by phpBB® Forum Software