Hosting InfoPath as an XML Editor in Another Application

Applies to: InfoPath 2010 | InfoPath Forms Services | Office 2010 | SharePoint Server 2010 | Visual Studio | Visual Studio Tools for Microsoft Office

The Microsoft InfoPath 2010 form editing environment can be hosted in a custom Windows application. This feature enables developers to integrate the InfoPath form editing environment into line-of-business applications. Developers writing traditional COM-based applications can use the InfoPathEditorObject object that is available by referencing the IPEDITOR.DLL, and developers writing Microsoft .NET–based applications can use the Microsoft.Office.InfoPath.FormControl assembly, which provides managed types based on the COM interface. The IPEDITOR.DLL and Microsoft.Office.InfoPath.FormControl assembly are both installed along with InfoPath 2010 in the C:\Program Files\Microsoft Office\Office14 folder.

The MSDN article, Hosting the InfoPath 2007 Form Editing Environment in a Custom Windows Form Application, focuses on the FormControl object and how to incorporate it into your custom .NET-based applications. The download associated with the article contains a custom application that provides .NET functions for replicating the InfoPath form editing environment through the use of COM IOleCommandTargets.