Programming InfoPath
InfoPath implements a declarative programming model where you can define common tasks through rules and actions. You should try to use that approach as much as possible, but where it falls short, you can program InfoPath directly through COM or through .NET. Which approach you choose depends on a number of factors, described in Table 10-6.
Table 10-6. The InfoPath programming tools
Approach | Editor | Languages | Comments |
|---|---|---|---|
COM | Microsoft Script Editor (MSE) |
|
|
.NET | Visual Studio 2005 (VSTO/VSTA) |
|
|
In my opinion, if you are creating templates that require more than a little code, you should plan to program InfoPath in .NET. Visual Studio is a professional programming tool that gives you far more assistance than the script editor. Although the Visual Studio .NET environment is complicated, the command completion, syntax checking, and debugging tools make it a great deal easier to program with InfoPath.
If you are working on templates that already contain JScript or VBScript code, you will probably want to continue in those languages for those templates. You'll also probably want to move to .NET for new templates, however.
Installing and Choosing the Language
The default Office setup does not install programming tools. To be able to program InfoPath templates, ...