Beispiel #1
0
 public void CTPFactoryAvailable(Office.ICTPFactory CTPFactoryInst)
 {
     if (CTPFactoryInst != null)
     {
         // Create a new task pane.
         taskPane = CTPFactoryInst.CreateCTP(
             "Microsoft.Samples.Vsto.CS.TaskPaneUI",
             "Contoso");
         taskPane.Visible = true;
     }
 }
Beispiel #2
0
        public void CTPFactoryAvailable(Office.ICTPFactory CTPFactoryInst)
        {
            try
            {
                String taskPaneTitle = ConfigurationManager.AppSettings["taskPaneTitle"];
                if (taskPaneTitle == null)
                {
                    taskPaneTitle = "default";
                }

                taskPane = CTPFactoryInst.CreateCTP(
                    "TestExcel2007Addin.SimpleControl", taskPaneTitle, Type.Missing);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Beispiel #3
0
 public void CTPFactoryAvailable(Office.ICTPFactory CTPFactoryInst)
 {
     taskPaneFactory = CTPFactoryInst;
 }