Export (0) Print
Expand All
8 out of 22 rated this helpful - Rate this topic

Guide to InfoPath 2007 Developer Documentation

Office 2007

Summary: Learn about the object models and development options available in Office InfoPath 2007, and find out where the conceptual, procedural, and class library reference topics are located. (11 printed pages)

Microsoft Corporation

February 2007

Applies to: Microsoft Office InfoPath 2007

Contents

Introduction to InfoPath 2007 Documentation

Microsoft Office InfoPath 2007 offers many different development options and environments, such as the introduction of a new managed-code object model, full integration of InfoPath form template development in Microsoft Visual Studio, the option of publishing form templates to a server running InfoPath Forms Services, and the ability to host InfoPath form editing functionality in custom Microsoft Windows or Web applications. This article provides links to the conceptual, procedural, and class library reference topics for each object model and development environment.

InfoPath 2007 Form Template Programming Models

Office InfoPath 2007 supports three object models for developing business logic in form templates, as shown in Table 1.

Table 1. Object models for developing business logic

Object Model Description

COM and Scripting Object Model

This object model is implemented in two dynamic-link library (*.dll) files:

IPEDITOR.dll Provides the COM-based object model for the InfoPath form editing runtime. Exposes the XDocument object and other objects and members that can be called from form template business logic written in JScript or VBScript. Also exposes methods of the Application object and XDocuments collection that can be called from COM components and applications to automate the InfoPath application.

IPDESIGN.dll Provides COM-based interfaces for creating custom form converters, and provides the ExcelImporter and the WordImporter objects for creating new InfoPath form templates by importing the design of forms created in Microsoft Office Excel and Microsoft Office Word.

Bb294378.note(en-us,office.12).gifNote:
Although the InfoPath client still supports creating business logic with scripting languages (JScript and VBScript) against the COM and Scripting object model, business logic written in script is not supported for browser-enabled form templates deployed to Office Forms Server 2007 or Microsoft Office SharePoint Server 2007 with InfoPath Forms Services. Browser-enabled form templates must use the new InfoPath managed code object model for custom business logic.

InfoPath 2003-Compatible Managed Code Object Model

This object model was introduced in Microsoft Office InfoPath 2003 Service Pack 1 together with the Microsoft Office InfoPath 2003 Toolkit for Visual Studio .NET for writing business logic in form templates with managed code. This object model is still supported by Office InfoPath 2007 to provide compatibility with InfoPath 2003.

The classes and members of this object model are exposed through the Microsoft.Office.Interop.InfoPath.SemiTrust namespace. This object model is implemented in the Microsoft.Office.Interop.InfoPath.SemiTrust.dll assembly file to provide COM interop against the InfoPath COM object model for form template business logic written using C# or Visual Basic .NET.

Bb294378.note(en-us,office.12).gifNote:
Although Office InfoPath 2007 still supports creating business logic with the InfoPath 2003-compatible managed-code object model provided by the Microsoft.Office.Interop.InfoPath.SemiTrust namespace, business logic written using this object model is not supported for browser-enabled form templates deployed to Office Forms Server 2007 or Microsoft Office SharePoint Server 2007 with InfoPath Forms Services. Browser-enabled form templates must use the new InfoPath managed code object model for custom business logic.

Bb294378.note(en-us,office.12).gifNote:
When you create a form template project that is compatible with InfoPath 2003, by default, all calls will be to members of the Microsoft.Office.Interop.InfoPath.SemiTrust namespace that are backward compatible with InfoPath 2003. To create a form template that is backward compatible, in the Form Options dialog box, under the Programming category, set the Form template code language to C# (InfoPath 2003 Compatible) or Visual Basic (InfoPath 2003 Compatible). However, if it is no longer necessary to be backward compatible, you can use new object model members in the Microsoft.Office.Interop.InfoPath.SemiTrust namespace. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.

New InfoPath Managed Code Object Model

When you start designing a new form template, if you select the Enable browser-compatible features only check box in the Design a Form dialog box, the new InfoPath managed-code object model provides a subset of its object model. This subset contains only the types and members that are supported in the business logic of form templates deployed as browser-enabled form templates running on Office Forms Server 2007 or Microsoft Office SharePoint Server 2007 with InfoPath Forms Services. After the form template is deployed to the server, the business logic written against this subset of the object model can run in both Office InfoPath 2007 or in a Web browser (depending on which program is available on a user's computer).

(Alternatively, to enable this setting in the Form Options dialog box, under the Compatibility category, select the Design a form template that can be opened in a browser or InfoPath check box.)

If you clear the Enable browser-compatible features only check box in the Design a Form dialog box, or the Design a form template that can be opened in a browser or InfoPath check box in the Form Options dialog box, the full InfoPath object model will be available. It contains additional types and members that provide functionality that is not supported in the business logic of browser-enabled form templates. Form templates that contain business logic written against the InfoPath-specific classes and members in this assembly run only when the form template is opened in Office InfoPath 2007.

The classes and members of the new InfoPath managed-code object model are exposed through the Microsoft.Office.InfoPath namespace.

Bb294378.note(en-us,office.12).gifNote:
When using the new InfoPath managed-code object model, you can write conditional logic that uses the properties of the Microsoft.Office.InfoPath.Environment class to determine which environment the form template is running in (InfoPath or a Web browser). Using this conditional logic, your business logic can branch between code that works in a Web browser and code that works only in InfoPath. For more information, see How to: Write Conditional Logic That Determines the Run-time Environment.

InfoPath Managed Code External Automation Object Model

Office InfoPath 2007 also provides a managed-code object model that is exposed by members of the Microsoft.Office.Interop.InfoPath namespace for writing code to automate InfoPath from an external application.

InfoPath 2007 External Automation Programming Models

Office InfoPath 2007 supports two object models for external automation of the Office InfoPath 2007 application, as described in Table 2.

Table 2. Object models for external automation

Object Model Description

InfoPath COM External Automation Object Model

The InfoPath COM and Scripting Object Model provides methods of the Application object and XDocuments collection that can be called from COM components and applications to automate the InfoPath application.

InfoPath Managed Code External Automation Object Model

Office InfoPath 2007 also provides a managed-code object model that is exposed by members of the Microsoft.Office.Interop.InfoPath namespace for writing code to automate InfoPath from an external application.

InfoPath 2007 Form Control Programming Models

The InfoPath form editing functionality has been factored into a set of properties and methods that are exposed through the InfoPathEditorObject object of the IPEDITOR DLL. InfoPath 2007 Setup also installs the Microsoft.Office.InfoPath.FormControl.dll assembly, which wraps the COM object of the InfoPathEditorObject object and exposes the Microsoft.Office.InfoPath.FormControl class for using its properties and methods in Windows Forms and other .NET Framework applications.

The InfoPathEditorObject and FormControl classes enable you to host a subset of InfoPath editing features in another application by using an ActiveX control and COM code, or by using a Windows Form control and managed code. For more information about hosting InfoPath form editing in another application, see Hosting the InfoPath 2007 Form Editing Environment in a Custom Windows Form Application, and the download InfoPath 2007 Sample: Using IOLECommands with the InfoPath Form Control.

Table 3. Form control programming models

Object Model Description

InfoPathEditorObject Object

Provides methods and properties for working with the Form Control as an ActiveX control from COM code.

Microsoft.Office.InfoPath.FormControl Class

Provides methods and properties for working with the Form Control wrapped as a Windows Form control from managed code.

Forms Server 2007 Programming Models

Microsoft Office Forms Server 2007 and InfoPath Forms Services support two object models for automating server tasks and for working with the functionality of the XmlFormView control when an InfoPath form template is hosted in a custom Web page.

Table 4. Forms Server and Forms Services programming models

Object Model Description

Microsoft Office Forms Server 2007 Automation Object Model

Exposed by the Microsoft.Office.InfoPath.Server.Administration namespace for automating server tasks, such as verifying and uploading form templates from code running on the server. Code written against this object model can only run from the server and requires server administrator access and permissions.

XmlFormView Control Object Model

Exposed by the Microsoft.Office.InfoPath.Server.Controls, this object model is used to work with the functionality of the XmlFormView control, which is used to host InfoPath form templates in custom Web pages.

For more information, see Hosting the InfoPath 2007 Form Editing Environment in a Custom Web Form.

InfoPath Form Definition File (XSF) Schema Reference

The InfoPath 2007 XSF Schema Reference is the documentation for the InfoPath form definition file (.xsf) schema. This schema defines the types, elements, and attributes used in the manifest.xsf file of an InfoPath form template file (.xsn).

Bb294378.note(en-us,office.12).gifNote:

This documentation is available only on MSDN.

Where to Find Help in the MSDN Library and InfoPath Help Systems

Table 5 shows where to find the various components of the InfoPath 2007 and Office Forms Server 2007 (InfoPath Forms Services) developer documentation.

Table 5. Location of InfoPath and Forms Server documentation

Documentation Area Location

InfoPath 2007 managed code documentation

The documentation for using managed code to develop form template business logic and for external automation is located in the MSDN Library at the following location:

Development Tools and Languages\Visual Studio 2005\Visual Studio\Visual Studio Tools for Office\InfoPath Developer Reference for Managed Code

The form template-specific sections of this documentation are also available in the Help systems of the Visual Studio Tools for Applications (VSTA) and Visual Studio 2005 Tools for Office Second Edition (VSTO 2005 SE) environments.

The external automation and FormControl sections of this documentation are also available in the VSTO 2005 SE environment's Help.

InfoPath 2007 COM and Scripting documentation and technical articles

The InfoPath 2007 Developer Reference (which contains the COM and Scripting documentation and other overview content) and all technical articles are located in the MSDN library at the following location:

Office Solutions Development\2007 Microsoft Office System\InfoPath 2007

The InfoPath 2007 Developer Reference is also available from InfoPath 2007 and the Microsoft Script Editor by using the Help menu and the built-in Office Help Viewer. The Help menu also provides access to the Microsoft Script Editor Help, which includes conceptual and reference documentation for Microsoft XML Core Services 5.0 for Microsoft Office (MSXML 5.0) and scripting documentation.

Office Forms Server 2007 / InfoPath Forms Services documentation

The documentation for automating server tasks and working with the Microsoft.Office.InfoPath.Server.Controls.XmlFormView control is located in the MSDN Library at the following location:

Office Development\2007 Microsoft Office System\Forms Server 2007

Bb294378.note(en-us,office.12).gifNote:
This documentation is available on MSDN and is included as a separate CHM file, OFS12sdk.chm, in the downloadable Microsoft Office SharePoint Server 2007 SDK: Software Development Kit and Enterprise Content Management Starter Kit.

InfoPath 2007 Form Definition File (XSF) Schema Reference

The InfoPath 2007 XSF Reference is located in the MSDN Library at the following location:

Office Solutions Development\2007 Microsoft Office System\InfoPath 2007\InfoPath 2007 XSF Schema Reference

Bb294378.note(en-us,office.12).gifNote:
This documentation is available only on MSDN.

MSDN Community Content Features

All Office InfoPath 2007 documentation that is published in the MSDN Library supports the MSDN Community Content features that enable users to comment on, edit, and add content to online documentation. We encourage you to use these features to add code examples and brief pieces of information that might be useful to other users of the documentation. To do so, click the Add new Community Content link, which is located under the Community Content heading at the bottom of each page. For more information about using MSDN Community Content features, see the MSDN Community Content FAQ.

Where to Find Documentation and Tools Published in the InfoPath 2003 SDK

The InfoPath Software Development Kit (SDK) will not be published for Office InfoPath 2007. The following documentation components that were published for InfoPath 2003 in the Microsoft Office InfoPath 2003 SDK have been updated for Office InfoPath 2007 and are now published in the locations described in Table 6.

Table 6. SDK documentation updated for InfoPath 2007

Documentation Component Description

InfoPath Developer Reference

The InfoPath 2007 Developer Reference is now published separately on MSDN.

InfoPath XSF Schema Reference

The InfoPath Form Definition File Schema Reference for InfoPath 2007 is now published separately on MSDN.

Developer Sample Forms

These samples and their associated documentation have not been updated for Office InfoPath 2007 and are not part of the InfoPath Developer Reference. To obtain the samples, you can download and install the Microsoft Office InfoPath 2003 SDK.

Remaining documentation components

Most of the remaining documentation that was part of the Microsoft Office InfoPath 2003 SDK has been updated and incorporated into the InfoPath Developer Reference.

The following tools that were distributed for InfoPath 2003 in the Microsoft Office InfoPath 2003 SDK are now available for Office InfoPath 2007 in the locations described in Table 7.

Table 7. Tools available for InfoPath 2007

Tools Description

HTML to XHTML Conversion Tool (html2xhtml.dll)

Installed with Visual Studio 2005 Tools for Office Second Edition in the C:\Program Files\Microsoft Office\Office12\InfoPath SDK folder.

Processing Instruction Update Tool (PIFix.exe)

Installed with Visual Studio 2005 Tools for Office Second Edition in the C:\Program Files\Microsoft Office\Office12\InfoPath SDK folder.

InfoPath to Word Wizard

Installed with Visual Studio 2005 Tools for Office Second Edition in the C:\Program Files\Microsoft Office\Office12\InfoPath SDK folder.

Form Registration Tool (RegForm.exe)

Installed with Office InfoPath 2007 in the C:\Program Files\Microsoft Office\Office12 folder.

Remaining tools

The remaining tools have been deprecated for Office InfoPath 2007. To obtain the tools, you can download and install the InfoPath 2003 Software Development Kit (SDK).

Additional Resources

For more information about developing with InfoPath, see the following resources:

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.