As you can see from my previous post, I’m really digg’in InfoPath 2007 right now. However, one thing I’ve been thinking about is how hard it would be to host InfoPath 2007 forms engine in a custom app, either via a rich Winforms application or a lighter-weight Web form.
It turns out InfoPath Server 2007 provides a few controls that can be used in either environment. First, they provide a COM component called the InfoPathEditorObject (found in ipeditor.dll) for use in unmanaged code. Second, they provide a .NET component calledFormControl (found in Microsoft.Office.InfoPath.FormComponent.dll) for use in managed Winforms applications. And lastly, they provide a WebForm control called XmlFormView for use in ASP.NET applications. You can read more about hosting the Winforms control hereand the ASP.NET WebForm control here.
None of these controls provide much in the way of designing forms. The COM and .NET components allow you to open form instances, create new form instances based on existing form templates, and fill out forms, but they don’t seem to provide any straightforward approach for creating/designing new form templates, at least not that I can see. Darn.
Also, it’s important to note that using these controls doesn’t remove the need to have InfoPath 2007 installed on the machine running the hosting app — the product must be installed in order for the controls to load. The control dll’s ship with the product and are not redistributable.
This XmlFormView control allows you to embed InfoPath forms within existing ASP.NET applications in order to make them fit within your existing skins/chromes and to provide a more seamless experience.This control only allows users to render and fill-out existing forms. And it requires the embedded forms to be hosted via Forms Server 2007 or SharePoint Server 2007 Forms Services for the browser rendering piece.
The InfoPath team has done a killer job but it looks like I’ve already identified my first big “ask” for InfoPath v.Next — make it easy to host and customize the template design experience within my own apps, and perhaps even provide a simplified template design experience via an Ajax-based designer that I can host within my Web apps for increased reach in user report generation.
Is that too much to ask? 😉