VSTO 3.0 for Office 2007 Programming
上QQ阅读APP看书,第一时间看更新

Visual Studio 2008 InfoPath solution overview

The VSTO 3.0 experience brings InfoPath forms right into Visual Studio by using InfoPath 2007. Once you have installed Visual Studio 2008 in your development environment, you're ready to create InfoPath solutions by using Visual Studio. The following images in this section show the steps to the InfoPath solution using Visual Studio. These are the dialog boxes and the environment window that you will use when you begin creating InfoPath solutions.

The following screenshot displays Visual Studio New Project dialog box that you use to open an InfoPath template from Visual Studio.

Visual Studio 2008 InfoPath solution overview

The next screenshot shows the Design a Form Template dialog box, in which you select the type of template that you want to create. The type of template that you select is normally determined based on your data source (database, XML file, and so on). You can also use this dialog box to open an existing form template.

Visual Studio 2008 InfoPath solution overview

The window in the next screenshot shows all of the supporting files (in the rightmost pane) for creating an InfoPath solution. The formcode.cs file is used to write business logic, in other words, the customization code for your InfoPath solutions. This screenshot shows the InfoPath environment in Visual Studio 2008. Web Service is used to create forms that interact with the web service for data processing. A Database is used to create forms that interact with the Access or Microsoft SQL Server Database for data processing. XML or Schema is used to create forms that process the data source as the existing XML document or the XML schema. Connection Library will search the Microsoft Office server for the existing data connection that can be used for the form.

Visual Studio 2008 InfoPath solution overview

The VSTO problem when installing Office InfoPath 2007

When installing Microsoft Office InfoPath 2007, you need to carry out the following simple procedure to avoid the problem of programming compatibility with .NET framework:

  1. Install the Microsoft Office 2007 clients (without .NET programming support for the .NET Framework version 2.0).
  2. Install the .NET 3.0 Framework.
  3. Install Microsoft Office SharePoint Portal Server 2007.
  4. Go to Add or Remove Programs and add .NET programmability support for .NET Framework version 2.0.