0

添付ファイルをZIPファイルに自動で作成するOutlookアドインを作りたいです。ここで、他の人に送信するタスク メールを ZIP 添付ファイルのみにするための TaskItem を取得する必要があります。

TaskItems を取得するために次のコードを試しましたが、常に自分自身に送信した TaskItem を取得します。他のタスク メールに送信するタスク メールはまだ zip ファイルではありません。

誰かが私を助けてくれることを願っています.Thank.

     //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.

            */


        }

    }
4

1 に答える 1