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; } }
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()); } }
public void CTPFactoryAvailable(Office.ICTPFactory CTPFactoryInst) { taskPaneFactory = CTPFactoryInst; }