Fix Word Merge Tool Reporting Illegal Characters in File Names
Question details
A Word Merge Tool add-in incorrectly reports illegal characters like colons and backslashes in attachment file names.
- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Attempting to use a third-party Merge Tool add-in to process file attachments in Word.
- Observed behavior
- The add-in throws an error stating file names contain illegal characters, even though the names appear valid and the files were moved from a network drive to a local drive.
Ensure that your file names genuinely do not contain restricted Windows characters such as \ / : * ? " < > |. Check your data source to verify if full directory paths are accidentally being read as file names.
Verify Data Source for Full File Paths
Add-ins often throw an illegal character error if they read an entire file path (which includes colons and backslashes) instead of just the file name.
In Windows environments, a colon (:) is used for the drive letter and a backslash (\) is used for directory structures. If your Mail Merge data source provides the absolute path instead of just the document name, the add-in might evaluate the entire string as a filename.
Open the Excel spreadsheet or CSV file that is linked to your Mail Merge document.
Locate the column containing the attachment names. Verify if the cells contain full paths (e.g., C:\Attachments\file.pdf) instead of just the names (e.g., file.pdf).
If the add-in expects only the filename, modify your spreadsheet column to remove the folder path. Alternatively, check the add-in settings to see if you need to define a base attachment folder.

Gather Diagnostic Information for Add-in Support
If the file paths are correct, the issue may stem from an add-in bug or a Word compatibility problem. Collect the version details for further troubleshooting.
Perform Mail Merge Seamlessly with WPS Office
If third-party Word add-ins are causing frustrating compatibility errors with file attachments, try WPS Office. It provides a robust, built-in Mail Merge feature that doesn't rely on buggy external add-ins, handles data sources flawlessly, and offers excellent compatibility.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite.
- 2. Open Your Document: Launch WPS Writer and open your existing Word document and data source.
- 3. Use Built-in Mail Merge: Navigate to the References tab and select Mail Merge to natively link your data and process your documents.

Frequently Asked Questions
Why do colons and backslashes trigger an illegal character error?
In Windows operating systems, characters like colons (:) and backslashes (\) are reserved for system file paths and directories. They cannot be used in a standard file name. If an application attempts to save a file with these characters in the name itself, the system will reject it.
Can moving files from a network drive to a local drive fix path errors?
Moving files can resolve permission issues or network latency, but if the add-in is misinterpreting the file path text in your data source as a file name, simply relocating the files will not resolve the illegal character error.
How do I check which add-ins are installed in Microsoft Word?
You can view your installed add-ins by opening Word and navigating to File > Options > Add-ins. From there, you can manage COM Add-ins, view their publishers, and disable any that might be causing conflicts.




