Outlook 点击new message 触发的事件
Hello,
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!!*
Ps: i'm using VS 2005 ( C#).
==========================================================================
|
Hi , 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(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(Inspector As Outlook.Inspector)![]() Windows.Forms.MessageBox.Show(TypeOf Inspector.CurrentItem Is Outlook._MailItem) End Sub
Thanks |



浙公网安备 33010602011771号