Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Outlook VS2012
Hi,
 
i try to build a context menu in Outlook 2013 with VS2012. But without any success.
In outlook 2010 I solved this problem with this code:
 
this.Application.ItemContextMenuDisplay += new Outlook.ApplicationEvents_11_ItemContextMenuDisplayEventHandler(Application_ItemContextMenuDisplay);
 
But the Event "ItemContextMenuDisplay" does not exist any longer in outlook 2013.
 
How do I solve this problem in outlook 2013?
 
Thanks
Best Regards
WW
Posted 2-Apr-13 3:09am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
you will have to user Ribbons to create context menu on mail items. this will work on outlook 2010 and above version.
 
Ribbon1.xml is as below.
 


 


<button id="MyContextMenuMailItem">
label="Upload Email"
tag="my Mail"
visible="true"
onAction="btnAction"/>
</button>



 
and add folowing code on addins.cs file
 
protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
{

return new Ribbon1();

}
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,192
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 12 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100