logo
search
Document Editing Problems

How to Use Word Mail Merge to Insert Product Documents Automatically

Khadija KhanKhadija Khan Oct 7, 2026 869 views

Question details

The user wants to conditionally append different product brochures or documents to client letters during a mail merge process based on specific product selections.

How to Automatically Insert Product Documents Using Word Mail Merge
Product
Word
Device & OS
not provided
Scenario
Creating customized client letters that require specific product documentation to be automatically attached based on client database fields.
Observed behavior
Needs to properly configure INCLUDETEXT and IF fields, format file paths correctly, and manage page breaks for multiple conditional product selections.
Before you start

Ensure all your product brochure documents are saved in a stable, accessible folder, and write down their exact file paths before configuring your mail merge fields.

Solution 1Recommended

Use Nested IF and INCLUDETEXT Fields

Configure field codes in your mail merge document to automatically evaluate product conditions and insert the correct external files.

By combining IF statements with the INCLUDETEXT command, Word can check the value of your mail merge data and pull in external document content dynamically. You must use the application's built-in keyboard shortcuts to create valid field code braces.

1
Insert functional field braces

Place your cursor where the document should be inserted and press Ctrl+F9 to create functional field braces { }. Do not type these curly brackets manually with your keyboard, as they will not act as code.

2
Set up the IF condition

Inside the braces, type the condition to check your data. For example: IF { MERGEFIELD Product1 } = "X". Ensure your database field names do not contain spaces (e.g., use Product_1 instead of Product 1).

3
Add the INCLUDETEXT command

Inside the true outcome of your IF statement, press Ctrl+F9 again and type the inclusion command with your file path: { INCLUDETEXT "C:/Documents/Brochure.docx" }. Use forward slashes or double backslashes for the file path to prevent errors.

4
Implement manual page breaks

To ensure the attached brochure starts on a new page, add a page break right before the INCLUDETEXT command within the quotation marks. If a standard page break fails to trigger, use the code { QUOTE 12 } instead.

5
Nest IF fields for multiple conditions

If you need a single document inserted when either Product2 or Product3 is selected, nest your IF fields. Set the false outcome of the first IF statement to be a second IF statement evaluating the next product.

Use Nested IF and INCLUDETEXT Fields
Relative File Paths: If you plan to move these files to another computer, use relative paths instead of absolute drive letters so the mail merge continues to work properly as long as the folder structure remains intact.
Efficient Mail Merge Solutions

Use WPS Writer for Seamless Mail Merge Operations

WPS Writer offers a highly compatible and intuitive Mail Merge toolkit. It makes generating bulk personalized letters, managing complex field codes, and connecting databases incredibly straightforward.

  1. 1. Open Mail Merge: Launch WPS Writer, open your main letter document, and navigate to the 'Mailings' or 'References' tab. Click 'Mail Merge' to activate the toolbar.
  2. 2. Connect data source: Click 'Open Data Source' to link your Excel spreadsheet or database containing the client and product information.
  3. 3. Insert field codes: Use the 'Insert Merge Field' button to add your data points. Press Ctrl+F9 to insert your nested IF and INCLUDETEXT conditional commands just as you would in standard word processors.
  4. 4. Merge and generate: Click 'Merge to New Document' to execute the logic, which will evaluate your conditions and automatically insert the correct product brochures into the final letters.
Fully compatible with Microsoft Word document formats (.docx)Intuitive Mail Merge wizard for step-by-step guidanceSeamlessly handles advanced field codes like IF and INCLUDETEXTFree, lightweight, and fast document processing
microsoft office alternative - wps office

Frequently Asked Questions

Why aren't my INCLUDETEXT documents showing up after the merge?

Field codes often require a manual refresh to display their output. After completing the mail merge, press Ctrl+A to select the entire document, then press F9 to update all fields and reveal the inserted text.

How should I format file paths in the INCLUDETEXT field?

You must use either double backslashes (e.g., C:\\Folders\\File.docx) or single forward slashes (e.g., C:/Folders/File.docx). Using standard single backslashes will cause the path to be misread by the software.

What is QUOTE 12 and why do I need it?

QUOTE 12 is a field code that automatically generates a manual page break. It is used as a highly reliable workaround when a standard page break inserted via the keyboard fails to execute correctly inside complex nested IF statements.

Why isn't my mail merge recognizing the typed { } brackets?

Typing curly brackets using the keyboard just creates standard text characters. You must use the Ctrl+F9 keyboard shortcut to insert functional field code brackets, which will appear highlighted or shaded to indicate they contain operational commands.