How to Export Word Form Data to XML or Structured Formats
Question details
The user needs to extract collected data from Word 2016 forms containing repeated fields and transfer it to another IT system in XML or a similarly structured format.

- Product
- Microsoft Word 2016
- Device & OS
- not provided
- Scenario
- Transferring form field data from a completed Word document into an external IT system using structured data formats.
- Observed behavior
- The data is currently locked within Word 2016 forms and needs to be programmatically extracted, tagged, and structured.
Ensure that your Word document uses proper Content Controls rather than just plain text, and verify that the Developer tab is enabled in your ribbon to access the necessary XML mapping tools.
Extract Data Using Mapped Content Controls
Use Word's Developer tools to map content controls to a custom XML part, allowing you to easily extract the underlying structured data.
Using mapped content controls is the most reliable method for extracting structured data from Word forms. By linking your form fields to a custom XML part, the entered data is stored as a separate XML file within the document's underlying file structure, making it highly accessible for programmatic extraction.
Navigate to File > Options > Customize Ribbon. In the right-hand column, check the box next to 'Developer' and click OK.
Select the Developer tab on the ribbon. In the Controls group, insert Rich Text, Plain Text, or Drop-Down List content controls where users need to input data.
Click 'XML Mapping Pane' in the Developer tab. Add your custom XML schema and map the specific XML nodes to your inserted content controls by right-clicking the node and selecting 'Map to Selected Content Control'.
Save the document as a standard .docx file. Since a .docx file is a compressed archive, you can rename the file extension to .zip, open it, and navigate to the 'customXML' folder to extract the structured XML data directly.

Export Data from Legacy Form Fields
If you are using legacy form fields in a protected document, you can configure Word to save only the form data as a delimited text file.
Try WPS Office for Seamless Document Management
While extracting complex XML data requires specific Developer tools in Microsoft Word, WPS Office provides a free, lightweight, and highly compatible alternative for everyday document editing, form filling, and word processing tasks.
- 1. Download WPS Office: Visit the official WPS Office website and click the download button for your operating system.
- 2. Install the Application: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
- 3. Open and Edit Documents: Launch WPS Writer and open your existing Word documents to edit text, fill out forms, and manage your files seamlessly.

Frequently Asked Questions
Can I export legacy Word form fields directly to XML?
Word natively allows you to save legacy form data as a comma-delimited text file by enabling 'Save form data as delimited text file' in Advanced Options. To get XML, you will need to parse this delimited text file into an XML format using a script or external tool.
Why are my content controls not showing up in the XML mapping pane?
Content controls must be properly inserted from the Developer tab, and your document must be saved in the modern .docx format. Older .doc formats do not support the custom XML mapping features.
Is Word the best tool for collecting structured data?
While Word can handle basic forms through content controls, dedicated web-based form solutions or database entry systems are usually more reliable, scalable, and easier to use when strict structured data (like XML or JSON) is required for IT system integration.




