First able , sorry for disturbing you, but I need really some help. So thanks!!
Actually, I want to create a new button in the “ New mail window of outlook 2007”, and when I click on this button , it will be possible to execute a “ action”.
The problem is , I can’t determinate when the event “” open the new mail window of outlook””” it’s happen. To create my button.
So please, if you have any code which can help me to do this , it’s will be great. Thank you!!*
Outlook hasn't got the Create New Email Event but you can use the NewInspector event in new mail inpector. See the following code:
Private Sub ThisAddIn_Startup()Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
Dim ins As Microsoft.Office.Interop.Outlook.Inspectors = Me.Application.Inspectors
AddHandler ins.NewInspector, AddressOf ThisAddIn_NewMail
End Sub
Private Sub ThisAddIn_NewMail()Sub ThisAddIn_NewMail(Inspector As Outlook.Inspector)
Windows.Forms.MessageBox.Show(TypeOf Inspector.CurrentItem Is Outlook._MailItem)