Change the form template of an InfoPath 2010 form

by S.Y.M. Wong-A-Ton | Filed under: InfoPath 2010

Learn how you can use InfoPath Filler 2010 to relink an InfoPath form to a previously published form template or fix the link to a form that cannot find its form template.

If you are getting the error InfoPath cannot open the following file, because the form template the form uses was moved, you can use the instructions in this article to relink the form to a republished form template.

A prerequisite for making the solution described in this article work is that you have the original form template that was used to create the InfoPath form you want to relink or that that form template has the same XML schema that was used to create the InfoPath form.

An InfoPath form stores the form template it is linked to in processing instructions at the top of the XML file that represents the InfoPath form.

If you want to change where InfoPath looks for a form template that is linked to a form, you can use Notepad to delete the processing instructions in the XML file that represents the InfoPath form, then open the XML file in InfoPath Filler 2010, and select a form template to link the file to.

Whenever you use InfoPath Filler 2010 to open an XML file that is not already linked to an InfoPath form template, InfoPath Filler 2010 will prompt you to select a form template for the file.

The Open With Form Template dialog box in InfoPath 2010

Figure 1. The Open With Form Template dialog box in InfoPath 2010.

You can select a form template that has been published to for example a network location or to SharePoint and link it to the XML file.

Remember to select the Always use this form template for this file check box on the Open With Form Template dialog box and then save the file to permanently link the form to the form template and have InfoPath Filler 2010 re-add new processing instructions to the XML file.

Although this process is not as complex as it seems, I have created the following Microsoft InfoPath 2010 video tutorial in which I show you how to relink a simple InfoPath form to a previously published form template using InfoPath Filler 2010.

You can get the InfoPath 2010 Meeting Agenda form template that I used in the video from InfoPath meeting agenda template article. And to get more information about moving form templates, also see How to open an InfoPath form and template that were moved or copied.

Related Posts

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. Usage of techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.

 
InfoPath 2010 Cookbook

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers