Add, remove, or update resource files in a form template

A resource file is a file that is used to display additional information in a form template. When you save or publish a form template, any resource files are included in the form template.

You can add the following types of resource files to your form template:

HTML files    You can use HTML files to display information in a custom task pane (custom task pane: An .html file whose content is displayed in a window next to a form. Custom task panes can provide form-specific commands and Help content.).

 Note   When you add an HTML file as a resource file to a form template, you should also add any files that are required by the HTML file, such as other HTML files, style sheets, or graphics files.

XML files    You can use XML files to populate list box controls, combo box controls, or drop-down list box controls. If the data in a list box, combo box, or drop-down list box control are constant, put that data in an XML file and add that file to the form template as a resource file, rather than using a data connection (data connection: The connection between an InfoPath form and an external data source, such as a database, Web service, SharePoint library, or XML file. Data connections are used to query and submit data.) to populate those controls. When you use a resource file, forms that are based on that form template open quicker than forms that use a data connection to populate those controls. That is because the data in a resource file is considered part of the form template and does not rely on a data connection to get the data. If the form template is not configured so that the form stores the data from an external data source, the form must be connected to the network in order to get the required data. A resource file doesn't need a data connection, because the data is already part of the form.

What do you want to do?


Add a resource file to a form template

  1. On the Tools menu, click Resource Files.
  1. In the Resource Files dialog box, click Add.
  2. In the Add File dialog box, select the file that you want to add.

Top of Page Top of Page

Remove a resource file from a form template

  1. On the Tools menu, click Resource Files.
  1. In the Resource files in the form template list in the Resource Files dialog box, select the resource file that you want to remove from the form template.
  2. Click Remove.

Top of Page Top of Page

Update a resource file in a form template

You can update the resource file in a form template after the form template has been published. For example, you might want to add new items or delete existing items in a resource file that you are using to populate a list box control in your form template. To update the resource file, you must modify a copy of the resource file, and then add the updated resource file to the form template. When you add the updated resource file to your form template, you are actually replacing the existing resource file. After you add the updated resource file, publish the form template again. Your users will then get the updated resource file when they open a new, blank form that is based on the form template.

  1. Make any necessary changes to a local copy of the resource file.

 Tip   If you do not have a local copy of the resource file, you can extract a copy from the form template. Find links to more information about extracting the files in a form template in the See Also section.

  1. In InfoPath design mode, open the form template that the resource file is associated with.
  2. On the Tools menu, click Resource Files.
  1. In the Resource Files dialog box, click Add.
  2. In the Add File dialog box, select the file that you updated, and then click OK.
  3. In the Microsoft Office InfoPath dialog box, click Replace the existing file, and then click OK.
  4. In the Resource Files dialog box, click OK.
  5. To publish the form template, on the File menu, click Publish, and then complete the steps in the Publishing Wizard.

Top of Page Top of Page

 
 
Applies to:
InfoPath 2007