wstlwl 发表于 2015-9-13 13:11:30

Office Outlook 2007 add-in 开发

  1. 打开VS2005.Net,New Project-->Other Project Types--> Extensibility--> Shared Add-in.
  2.引用Micorsoft Outlook Object 12.0 library
  3. 其它问题可以参考, http://www.cnblogs.com/dudu/articles/3891.html
  4.如何获取用户当前选中的邮件呢?
  

Code
Selection selection = applicationObject.Application.ActiveExplorer().Selection;

            if (selection != null)
            {

                IEnumerator enumerator = selection.GetEnumerator();
                while (enumerator.MoveNext())
                {

                  MailItem mail = enumerator.Current as MailItem;
                  if (mail != null)
                  {

                  }
                }
            }  
  5.如何显示邮件内容呢?
  this.webBrowser1.Navigate("about:blank");
    this.webBrowser1.Document.Write(mail.HTMLBody);
  
  
页: [1]
查看完整版本: Office Outlook 2007 add-in 开发