2010-02-15 19 views
1

有没有办法判断Outlook 2007中的当前检查器窗口是读取窗口还是撰写窗口?我知道我们可以捕获事件,并在其上设置标志,但我不想捕获新的/回复/转发事件。有没有办法从督察对象中知道这一点?任何财产?任何MAPI属性?区分撰写检查器和读取检查器

一个正确的方向指针将不胜感激。

问候,

回答

4

Probally最简单的方法是看检查员CURRENTITEM是否发送

Outlook.MailItem currentMail = Inspector.CurrentItem as Outlook.MailItem; 

     if (currentMail != null) 
     { 
      if (currentMail.Sent) 
      { 
       //Read Mode 

      } 
      else 
      { 
       // Compose 
      } 

     } 
+0

哇。这很漂亮。感谢名单。 – shaibee 2010-02-16 14:41:50

+0

只有在没有回复的情况下,才能使用 – 2017-06-22 21:26:31