Although it's true that you can use Microsoft Office Word to create a document that looks and feels like a form, Word works best as a word-processing program, not a form-designing program. Conversely, Microsoft Office InfoPath was created specifically for designing and filling out electronic forms. If you want to convert existing Word documents into InfoPath form templates, you can use the Import Wizard in InfoPath to do so. You can then take advantage of dedicated InfoPath features for designing, publishing, and filling out forms. For example, in a sales report form template, you can use conditional formatting to automatically apply a red background color when numbers dip below sales projections. In the same form template, you can use a rule to enable forms based on that form template to be submitted as an attachment in an e-mail message when someone clicks a submit button. In addition, you can make your form template available to a wider audience by creating a browser-enabled form template.
When you convert a Word document to an InfoPath form template, the resulting form template will closely match the layout of the Word document. In addition, items in the Word document that meet certain conditions are automatically converted to the appropriate controls that users can enter data into. For example, if the Word document contains brackets surrounding multiple spaces, InfoPath assumes that you used that bracketed area as a text-entry field and converts it to a text box control in the resulting form template. Any Word form fields are converted to the corresponding controls in InfoPath.
You can use the settings in the Import Options dialog box to change the options for converting a Word document to an InfoPath form template.
This article explains the basic concept and procedure for converting a Word document to an InfoPath form template, including the features and settings that are not supported in the conversion process.
When you convert a Word document to an InfoPath form template, the document is used like a blueprint to create a new form template. The basic structure of the document is recreated as closely as possible in the form template. In a Word document, a "form field" is the location where a particular type of data, such as a name or address, is stored. If you choose to include Word form fields when you convert the document, text box, check box, and drop-down list box controls are added to the InfoPath form template at a location that corresponds to the location of the fields in the Word document. In addition, InfoPath automatically detects the parts of the Word document that might work well as repeating tables and rich text boxes, and converts them to the appropriate controls. For example, if an expense report document includes a blank, underlined area in which users can type notes about a particular expense, InfoPath will convert that area into a rich text box. Users can then type multiple lines of text in the rich text box, and format that text as appropriate.
To better understand the relationship between a Word document that you convert by using the InfoPath Import Wizard and the resulting InfoPath form template, imagine that for the past several years your organization has used a Word document called ExpenseReport.doc to collect expense report data from employees. Your IT department wants to convert that document to an InfoPath form template so that form data can be submitted as Extensible Markup Language (XML) to an Accounts Payable system.
If you use the Import Wizard to convert ExpenseReport.doc to a form template, InfoPath creates a form template called ExpenseReport.xsn. In the following example, the Expense Details table in the Word document has been converted into a repeating table in the resulting InfoPath form template. The repeating table enables users to insert or remove expenses as necessary by clicking commands on a shortcut menu.
When the Word document is converted to an InfoPath form template, the layout and other elements are preserved. By default, the number of empty rows in the InfoPath repeating table matches the number of empty rows in the Word table. However, you can save space on your form template by displaying just one or two rows by default.
This new form template contains elements that are similar to those found in the Word document, such as the table for collecting expense information. However, depending on the settings that you choose in the Import Wizard, some features may differ in the resulting form template:
Some settings and formatting in Word documents are not supported in InfoPath form templates. When you convert a Word document that contains such settings, the resulting form template will not contain those features or settings. For example, if your Word document has revision marks, the revision marks will be discarded in the resulting form template because InfoPath does not support this feature.
You can use the Design Checker task pane in design mode to discover any problems with the conversion. You can then take action to correct those problems.
The following is a list of features and settings that are not preserved when you convert a Word document to an InfoPath form template. In some cases, formatting is discarded but the underlying text is preserved. For example, if you have newsletter-style columns, InfoPath will discard the columns, but import the text contained in those columns.
Note: Some Word documents cannot be modified without a password. If this is the case with your document, you may not be able to successfully import it into InfoPath. To fix the problem, try removing the password protection from the document before you import it. In addition, some documents restrict users to certain types of editing actions, such as entering data in form fields. If this is the case with your document, you may not be able to successfully import it into InfoPath. To fix this problem, try removing the editing restrictions for your document before you import it.
The following list explains the features and settings that are partially supported when you convert a Word document to an InfoPath form template:
Vertical text InfoPath retains vertical text formatting in a Word document if the vertical text is found inside of a table cell. InfoPath discards vertical text formatting when converting a Word document if the vertical text is found outside of a table cell, in another part of the Word document.
Text boxes In Word documents, text boxes are containers for text that can be positioned on a page and sized. If the Word document contains a text box, that text box will be converted to a table cell in the resulting form template. Any text in the text box will appear in the table cell in the resulting form template.
Underlined text Underlining is supported in InfoPath form templates. However, any decorative or double underlines in the Word document are converted to single underlines in the resulting form template.
Hyperlinks that reference unsupported protocols All hyperlinks are converted, but if the hyperlink uses a protocol other than HTTP, HTTPS, FILE, FTP, or MAILTO, the hyperlink will not work when a user clicks the link in the resulting form template.
Character styles and text effects Superscript, subscript, and single strikethrough formatting styles are preserved during the conversion process. Other formatting styles and effects, including outlined text, hidden text, and shadow formatting, are discarded during the conversion process. Embossed or engraved text is converted to gray text in the resulting form template.
Section settings In Word, sections are used to vary the layout for a document within a page or between pages. InfoPath does not support these types of sections, which are discarded during the conversion process. Any settings that are applied to the first section in the Word document are applied to the resulting InfoPath form template.
Header and footer formatting Header and footer text in the Word document will be converted to header and footer text in the resulting InfoPath form template. Some character formatting may be discarded during the conversion process. For example, if you used both bold and italic formatting in the header of a Word document, InfoPath will use the first formatting style it encounters in the resulting form template and discard the remaining formatting. Similarly, any settings that are applied to the first header or footer section in the Word document are applied to the resulting header or footer text in the InfoPath form template.
Font conversion Although InfoPath imports the fonts from a Word document when creating a new form template, if the fonts in the document are not available on the computer where you perform the import, alternate fonts will automatically be selected for the form template.
Negative page margins Negative top and bottom margins will be imported as 0.
Negative margin, padding, and indent settings Negative margin, padding, and indent settings will be imported as 0.
Note: If you are importing a Word document with restricted permission, you must have Full Control access to the document. If you have only Read or Change access to the document, you will see an error message when you try to import it.
If your Word document includes a table, InfoPath may convert it into a layout table or a repeating table in the resulting form template. The type of table chosen depends on the design decisions you made in the Word document. You can use the following procedure to quickly change a converted layout table to a repeating table.
You can use repeating tables to offer your users an extra degree of flexibility when filling out forms. When you use repeating tables, your form template doesn't have to show numerous blank rows when the user first opens it. Instead, users typically see just one row and only add more when and if they need them. This saves space in the form and offers users an extra degree of personalization.
If you used multiple check boxes in your Word document, InfoPath imports them as check boxes in the resulting InfoPath form template. If you would rather use a group of option buttons, follow the steps below to convert the check boxes into option buttons in your form template.
You can use a group of option buttons on a Microsoft Office InfoPath form template when you want users to be able to make just one selection from a limited set of options.
Sometimes, elements from the original Word document either don't appear as expected in the resulting InfoPath form template or are removed during the conversion process. For example, InfoPath does not support the Word WordArt feature and replaces WordArt objects with placeholder images in the resulting form template.
If InfoPath detects problems during the conversion process, the Design Checker task pane opens automatically after you close the Import Wizard. In the task pane, you can review a list of the problems and take the necessary steps to fix them.
Note: If the Word document contains an object that InfoPath does not support, such as a Word drawing object, then InfoPath adds a placeholder image to the resulting form template, indicating where the object was originally located in the Word document. To find out more about the object, right-click the placeholder image on the form template, and then click More Details on the shortcut menu.
Note: You may notice that the Design Checker task pane contains a Refresh button. Clicking the Refresh button won't update messages that appear as a result of importing a Word document into InfoPath. If you want to remove import messages from the Design Checker task pane, you must open the Resource Files dialog box (Tools menu), and then remove the file named ImportErrors.xml. This file is created automatically when you import a Word document into InfoPath. After you remove the ImportErrors.xml file, click Refresh in the Design Checker task pane to permanently delete the import messages. The ImportErrors.xml file isn't required for the form template to function properly. In fact, for security reasons, it is good practice to remove this file before publishing your form template.