|
创建一个OutlookAddInCSDN工程 ![]() 创建后我们在工程里再添加一个名为"form1"的窗体, ![]() 进入form1页面加入 如图所示的各种控件: ![]() 然后在form.cs中加入下列代码: using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace OutlookAddIn { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void 关闭_Click(object sender, EventArgs e) { this.Close(); } private void button2_Click(object sender, EventArgs e) { this.richTextBox1.Clear(); } } } 最后在ThisAddIn.cs中写入如下代码: using System;
using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using Outlook = Microsoft.Office.Interop.Outlook; using Office = Microsoft.Office.Core; namespace OutlookAddIn { public partial class ThisAddIn { private void ThisAddIn_Startup(object sender, System.EventArgs e) { Form1 frm = new Form1(); frm.Show(); frm.TopMost = true; } private void ThisAddIn_Shutdown(object sender, System.EventArgs e) { } #region VSTO generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InternalStartup() { this.Startup += new System.EventHandler(ThisAddIn_Startup); this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); } #endregion } } 按下F5开始调试 ![]() 运行界面如下,PowerPoint文档打开了以后,首先弹出备忘提醒的小插件,使您对今天重要必须要做的工作一目了然: ![]() (责任编辑:admin) |










骆驼户外男 真皮磨砂日常休闲鞋 低帮 2011秋冬新款 专柜正品特价