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:
TIA
Daniele.
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.