Microsoft Office Tutorials and References
In Depth Information
Task Pane: Application-level customization
3. The solution will be created with all of the supporting files for our
development of the Word solution. The next image shows the
newly-created Word 2007 add-in solution.
4. Write a program to show this Task Pane and a message on the startup of
Word 2007, inside the ThisAddIn.cs file. This code will display a message
in the title bar of the Task Pane of Word 2007.
// Initializing the CustomTaskPane object of the current
application
private Microsoft.Office.Tools.CustomTaskPane
PacktTaskPaneControl = null;
// Iniatilizing the UserControl control
UserControl PacktUserControl = new UserControl();
// Loading the Task Pane on word start up
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
// Add the TextBox control to the CustomTaskPane
// The PacktUserControl parameter sets the title to "Sample
Search"
PacktTaskPaneControl = this.CustomTaskPanes.
Add(PacktUserControl, "Sample Search");
// Set the CustomTaskPane to visible
PacktTaskPaneControl.Visible = true;
}
 
Search JabSto ::




Custom Search