123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Xml.Linq;
- using Word = Microsoft.Office.Interop.Word;
- using Office = Microsoft.Office.Core;
- using Microsoft.Office.Tools.Word;
- using Microsoft.Office.Core;
- using System.Windows.Forms;
- using Microsoft.Office.Tools;
- using Microsoft.Office.Tools.Ribbon;
- namespace HTEXLabel
- {
- public partial class ThisAddIn
- {
- private void ThisAddIn_Startup(object sender, System.EventArgs e)
- {
- KnowledgeUserControl knowledgeUserControl = new KnowledgeUserControl();
- Microsoft.Office.Tools.CustomTaskPane myCustomTaskPane =
- this.CustomTaskPanes.Add(knowledgeUserControl, "My Custom Task Pane");
- // 可选:设置自定义功能面板的属性
- myCustomTaskPane.Visible = true;
-
- }
-
- private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
- {
- }
- protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
- {
- //return Globals.Factory.GetRibbonFactory().CreateRibbonManager(new Microsoft.Office.Tools.Ribbon.IRibbonExtension[] { });
- return new LableRibbon();
- }
- #region VSTO 生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要修改
- /// 使用代码编辑器修改此方法的内容。
- /// </summary>
- private void InternalStartup()
- {
- this.Startup += new System.EventHandler(ThisAddIn_Startup);
- this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
- }
- #endregion
-
-
- }
- }
|