I use this code...
Dim inspectors As Outlook.Inspectors = Outlook.Application.Inspectors
AddHandler inspectors.NewInspector, AddressOf Inspectors_NewInspector
... to add my custom panel to a net mailitem.
But if I use the snipping tool in windows and tell it to email the snippet, then NewInspector is not called eventhough a new mail is created.
Any idea why NewInspector is not called?
Thanks
UPDATE WITH CODE:
Here's a simple sample code. Sending a mail from an external program (like Word, Excel, Snipping tool etc) does not call the NewInspector event...
Imports System.Runtime.InteropServices
Imports Microsoft.Office.Interop.Outlook
Imports Microsoft.Office.Tools
Imports Outlook = Microsoft.Office.Interop.Outlook
Public Class ThisAddIn
Private WithEvents _inspectors As Outlook.Inspectors
Private Sub ThisAddIn_Startup() Handles Me.Startup
_inspectors = Globals.ThisAddIn.Application.Inspectors
End Sub
Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown
End Sub
Private Sub _inspectors_NewInspector(Inspector As Inspector) Handles _inspectors.NewInspector
MsgBox("New inspector")
End Sub
End Class