Select the product you need help with
INFO: Customizing the Microsoft Office XP Task PaneArticle ID: 288542 - View products that this article applies to. This article was previously published under Q288542 SUMMARY
Microsoft Office XP contains a new feature called the Task Pane. A Task Pane is a dockable dialog window that gives users a convenient way to use commands, gather information, and modify their documents. An Office Task Pane can contain one or more pages, and each page is broken up into sections. Developers can programmatically manipulate the Task Pane to perform certain functions such as view the pane, dock or undock the window, and add custom information to the New Item page that is common among all Office XP applications. MORE INFORMATION
The Office XP Task Pane is a special type of dockable CommandBar object. Only one task pane exists in each Office application and it can be accessed through the CommandBars collection under the name TaskPane. This CommandBar has a single control, which represents the active page. You can access a limited number of properties for the page by using this CommandBarControl. For example, to display the name for the current page in the Task Pane, you can use code such as the following:
Add Items to the New Item Task Pane PageThere is one Task Pane page that every Office XP application implements: the New Item page. This page corresponds to the File New dialog box in previous versions of Office. Office XP allows you to add or remove items on this page so that documents or templates you use most often can be added for quick reference. To do this programmatically, use the NewFile object that is exposed by each Office application.To access the NewFile object, use one of the following properties that are available from the Application object. The property names differ depending on which Office application you are working in:
The NewFile object exposes two methods, Add and Remove, which let you add and remove specific items into sections on the File New page for that Office application. For example, the following code creates a new entry in the "New Document" section for Word's File New Task Pane page: You can add items to New Item pages in the other Microsoft Office XP applications as well. If you are automating the Task Pane to suit a custom application, be sure to remove any items you add by using the Remove method when they are no longer needed. The new items you add persist for that user after the application is closed. REFERENCES
For more information on using the Task Pane, see the Visual Basic for Applications (VBA) Online Help for the NewFile Object.
Properties |


Back to the top








