Insert a template part

A template part is a portion of a form template that can be saved for reuse in multiple form templates. A typical template part consists of controls and a data source and may also include features such as data connections, data validation, and rules.

This topic describes how to add template parts to the Controls task pane and also how to insert and replace template parts on a form template. It does not describe how to design template parts. Find links to more information about designing template parts in the See Also section.

What do you want to do?

Add a template part to the Controls task pane

Insert a template part on a form template

Replace an existing template part with a newer version

Add a template part to the Controls task pane

Before you can add a template part to your form template, you must make the template part available in the Controls task pane. The Add Custom Control Wizard guides you through the process of adding the template part to the Custom category in the list of available controls.

  1. If the Controls task pane is not visible, click More Controls on the Insert menu, or press ALT+I, C.

  2. At the bottom of the Controls task pane, click Add or Remove Custom Controls.

  3. In the Add or Remove Custom Controls dialog box, click Add.

  4. On the first page of the Add Custom Control Wizard, select Template Part, and then click Next.

  5. On the next page of the wizard, click Browse.

  6. In the Files of type list, click InfoPath Template Parts, and then locate and double-click the template part that you want to add.

  7. Click Finish.

  8. Review the confirmation message, and then click Close to exit the wizard.

  9. In the Add or Remove Custom Controls dialog box, click OK.

Top of Page

Insert a template part on a form template

After you add the template part to the Controls task pane, you can insert it onto your form template.

  1. Place the cursor on the form template where you want to insert the template part.

  2. If the Controls task pane is not visible, click More Controls on the Insert menu, or press ALT+I, C.

  3. Under Custom in the Insert controls list, click the name of the template part that you want to insert.

    The template part appears inside a section control on the form template. You can recognize the template part on the form template because the words Section (Template Part: Name) appear as the section label, where Name is the name of the template part file.

    Label on form template indicating presence of template part

Top of Page

Replace an existing template part with a newer version

Before you can replace an existing template part on your form template with a newer version, you must use the Add Custom Control Wizard to replace the template part in the Controls task pane with the latest version. After you do that, use the following procedure to replace the original template part on your form template with the latest version. You must follow the steps for each form template that contains the older template part.

  1. Open the form template that contains the original template part.

  2. On the form template, select the template part.

    A message notifies you that a new version of the template part is available, as shown here.

    Message indicating that a newer version of the template part is available

    Tip: A similar message also appears in the Design Checker task pane.

  3. Right-click the blue icon next to the message text, and then click Update on the shortcut menu.

    Update command on shortcut menu for template part

    The Update command replaces all template parts of this type on the form template, even those found in other views.

  4. Repeat steps 1 through 3 for any other form templates that contain the template part.

Note: If you change a template part on a form template that is already in use throughout your organization, you must republish the form template after updating the template part.

Top of Page

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×