Пример #1
0
        void AddTaskPane(Word.Document Doc)
        {
            taskPaneControl1      = new TagUITaskPane();
            taskPaneControl1.Name = Doc.Name;
            taskPaneValue         = this.CustomTaskPanes.Add(taskPaneControl1, " ", Doc.ActiveWindow);

            DocumentProperties prps;

            try
            {
                prps = (DocumentProperties)Globals.ThisAddIn.Application.ActiveDocument.CustomDocumentProperties;
                if (ReadDocumentProperty("customTaskPaneName") != null)
                {
                    prps["customTaskPaneName"].Delete();
                }
                prps.Add("customTaskPaneName", false, MsoDocProperties.msoPropertyTypeString, taskPaneControl1.Name);

                taskPaneValue.VisibleChanged += new EventHandler(taskPaneValue_VisibleChanged);
            }
            catch
            { }
        }
Пример #2
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     tagUITaskPane1           = new TagUITaskPane();
     myCustomTaskPane         = this.CustomTaskPanes.Add(tagUITaskPane1, "TagUI RPA");
     myCustomTaskPane.Visible = true;
 }