Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: OUTLOOK 2013 - ItemContextMenuDisplayEvent

$
0
0
Hi All,
what i need is to add a custom choices into mail items' context menu.
What i'm trying to do is to catch the context menu display event, but with no luck,
(taken from here http://www.noordam.it/writing-a-context-menu-outlook-addin/[TEXT](http://www.noordam.it/writing-a-context-menu-outlook-addin/)
here's a branch of my IDTExtensibility2.OnConnection event code:
Try
            _outlookApplication = New Outlook.Application(Nothing, Application)
        Catch ex As Exception
            Dim message As String = String.Format("Errore.{0}{0}{1}", Environment.NewLine, ex.Message)
            MessageBox.Show(message, _progId, MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
        If Not _outlookApplication Is Nothing Then
            AddHandler _outlookApplication.NewMailExEvent, AddressOf NuovoMessaggio
            AddHandler _outlookApplication.ItemContextMenuDisplayEvent, AddressOf ApplicationItemContextMenuDisplay             
        End If
here's the event handler:
Private Sub ApplicationItemContextMenuDisplay(CommandBar As Office.CommandBar, Selection As Outlook.Selection) 
        messagebox.show("click")        
    End Sub
Any idea about where i'm wrong?
TIA
Daniele.

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>