void AddTaskPane(Excel.Workbook wb) { myUserControl1 = new TagUIExcelAddInTaskPane(); myUserControl1.Name = wb.Name; taskPaneValue = this.CustomTaskPanes.Add(myUserControl1, " ", wb.Application.ActiveWindow); DocumentProperties prps; prps = (DocumentProperties)Globals.ThisAddIn.Application.ActiveWorkbook.CustomDocumentProperties; if (ReadDocumentProperty("customTaskPaneName") != null) { prps["customTaskPaneName"].Delete(); } prps.Add("customTaskPaneName", false, MsoDocProperties.msoPropertyTypeString, myUserControl1.Name); taskPaneValue.VisibleChanged += new EventHandler(taskPaneValue_VisibleChanged); }
private void ThisAddIn_Startup(object sender, System.EventArgs e) { myUserControl1 = new TagUIExcelAddInTaskPane(); myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "TagUI RPA"); myCustomTaskPane.Visible = true; }