I want to make a Outlook Addin to make attachment file to ZIP file automatically. Now ,i have to get the TaskItem to make the task mail which i send to others is only have ZIP attachmens files.
I have trid the folowing code to get TaskItems.but always get the TaskItem which i sent myself.which i send to others task mail is not To zip file yet.
Wish Someone can help me.Thanks.
//the addin start up
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Application.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(Application_ItemSend);
}
//before send the mail
public void Application_ItemSend(object Item, ref bool Cancel)
{
//get the task items
var myinspector = Application.ActiveInspector();
if (myinspector != null)
{
//get the TaskItem
TaskItem OutlookTaskItem = myinspector.CurrentItem as TaskItem;
/*
automatically to make attachment file to ZIP file.
*/
}
}