How to Automatically Link a Word Form to Excel Data
Question details
The user needs to create an interactive form in a document that automatically populates multiple fields based on an input value (like an equipment code) from an Excel database.

- Product
- Word, Excel
- Device & OS
- not provided
- Scenario
- Automating data entry in a form by linking it to an external spreadsheet to pull relevant project or equipment information instantly.
- Observed behavior
- Word does not natively support simple lookup formulas for forms, requiring users to either build the form in Excel, use Mail Merge, or write custom VBA scripts.
Ensure your Excel data is formatted as a flat table with clear column headers in the first row, and close the Excel file before attempting to link it to a Word document to prevent locking errors.
Create the Form Directly in Excel Using XLOOKUP
Since Word lacks native lookup functions, building the interactive form directly in Excel is the most efficient and robust method for auto-populating fields.
Excel is inherently designed for data retrieval. By using formulas like XLOOKUP or VLOOKUP, you can create a dynamic form that instantly fills out project information as soon as you type an equipment code.
Create a worksheet in your Excel file named 'Data' and list your information (e.g., Equipment Code, Project Name, Location) in distinct columns.
Create a second worksheet named 'Form'. Design your layout, leaving a blank cell (e.g., B2) for the user to type the Equipment Code.
In the cell where you want the Project Name to appear, type =XLOOKUP(B2, Data!A:A, Data!B:B). This formula tells Excel to look for the code in B2 within column A of the Data sheet, and return the matching value from column B.
Go to the Review tab and click Protect Sheet. Ensure the input cell (B2) is unlocked before protecting, so users can only type the code and cannot accidentally break the formulas.

Use Word Mail Merge for Batch Processing
If you are required to use a Word template, Mail Merge is the best built-in tool to pull records from an Excel spreadsheet into a Word document.
Automate Word with Content Controls and VBA
For advanced users who need a standalone interactive Word document, VBA macros can bridge the gap between Word content controls and an Excel database.
Easily Link Spreadsheets and Documents with WPS Office
WPS Office offers powerful Mail Merge features in WPS Writer and advanced lookup formulas like XLOOKUP in WPS Spreadsheet. Whether you want to build your form entirely in a spreadsheet or merge data into a text document, WPS makes it seamless and highly compatible with Microsoft formats.
- 1. Prepare Data in WPS Spreadsheet: Open your data file in WPS Spreadsheet and verify that all columns have clear, text-based headers.
- 2. Open Template in WPS Writer: Launch WPS Writer and open the document template that will serve as your form.
- 3. Access Mail Merge: Navigate to the 'References' tab and click on the 'Mail Merge' button to reveal the merging toolkit.
- 4. Open Data Source: Click 'Open Data Source', locate your saved WPS Spreadsheet file, and select the sheet containing your records.
- 5. Insert and View Data: Use 'Insert Merge Field' to place data placeholders into your form, then click 'View Merged Data' to see your populated fields in real-time.

Frequently Asked Questions
Can a Word document automatically update when the linked Excel file changes?
Yes. If you are using Mail Merge, simply opening the Word document again will prompt you to refresh the data connection, pulling the latest Excel data. If you used Paste Special > Paste Link (OLE), you can right-click the linked data in Word and select 'Update Link'.
Why isn't my Excel data showing up correctly in the Word Mail Merge?
This often happens if the Excel file is currently open in another program, or if the column headers contain special characters or spaces that confuse the merge tool. Ensure your Excel file is saved, closed, and formatted strictly as a flat data table.
Is there an easier way to auto-fill a form without using VBA macros?
Absolutely. Building the interactive form directly within Excel using XLOOKUP or VLOOKUP is significantly easier than writing custom VBA code for Word. Excel is specifically designed for dynamic data retrieval and interactive forms.
Can I use Microsoft Power Automate to link Excel and Word?
Yes, if you use Microsoft 365. You can create a Power Automate flow that triggers when a new row is added to an Excel Online table, mapping the data into a 'Populate a Microsoft Word template' action to generate finalized forms automatically.




