Microsoft Office Tutorials and References
In Depth Information
Creating an InfoPath Task Pane
A Custom Task Pane in InfoPath 2007 is simply an HTML file that appears in the
Task Pane (on the right-hand side of the InfoPath form). The HTML file can include
form controls that are not bound to elements in the XML document. The HTML file
can also have inline script, where the script can call back into the InfoPath object
model, including calling any of your functions in the form code-behind script.
You can make web service calls from an HTML script, and you can also use InfoPath
query adapters. InfoPath query adapters are used to retrieve data that is stored
in the secondary data source (secondary data source is used to store data from
supplementary or other data sources, as distinct from the current data source).
We'll see how to do this in the next section.
The Task Pane functions like a toolbar in such a way that you can move
it around on the screen, dock the Task Pane horizontally or vertically, or
separate it to keep it floating on the screen.
Creating an InfoPath Task Pane
To create an InfoPath Task Pane, follow the steps below:
Open Visual Studio 2008, and create a new InfoPath 2007 Add-in project.
In the Visual Studio solution, right-click on the reference and then click Add
Reference on the .NET tab.
Scroll down to Microsoft.Office.Interop.InfoPath.Xml , and either
double-click on it, or select it and then click on OK.
To add the user control for the Custom Task Pane, right-click the project,
and then select Add New Item from the context menu. The Add New
Item window is displayed; select User Control , name the user control
CustomTaskPane.cs and click on Add .
In the Custom Task Pane, we are going to implement the number-to-word
conversion concept and add the labels, textbox entries, and buttons required
to build the user interface for the number-to-word converter functionality.
After building the user interface, the user control appears as shown in the
following screenshot:
Search JabSto ::

Custom Search