--- id: docx-mailmerge version: "0.5.0" license: MIT license_treatment: permissive maintenance: abandoned --- # docx-mailmerge — Performs a Mail Merge on docx (Microsoft Office Word) files License: permissive · Maintenance: abandoned · Downloads: 215.0K/mo ## What it is and what it does docx-mailmerge is a Python library that automates filling Microsoft Word templates by replacing merge fields with values you supply. It reads docx files, identifies merge fields defined in the template, and substitutes them with provided data—all without needing Microsoft Office installed. The library supports simple field replacement, dynamic table row generation from lists of dictionaries, and template duplication with page breaks for bulk document creation. The package has no runtime dependencies, making it lightweight to install. However, it has been archived and unmaintained since 2019. While it remains functional for basic mail merge tasks, you should be aware that it will not receive updates for compatibility with newer Python versions or changes to the docx specification. Use it for: - Generate personalized letters or documents by merging customer data into a template - Create bulk invoices or reports by populating templates with rows of tabular data - Automate document generation in a web application without deploying Microsoft Office on the server - Build dynamic table contents in docx files by supplying lists of dictionaries as row data - Produce multiple document copies from a single template with different field values for each ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Performs mail merge operations on docx files by replacing merge fields with supplied values, without requiring Microsoft Office to be installed. Yes, if you need basic mail merge for docx files and can work within its documented scope. The permissive MIT license and zero runtime dependencies make it low-friction to add. However, the abandoned status means no bug fixes or compatibility updates will arrive—test thoroughly with your target Python version and docx complexity before relying on it in production. ## Install pip install docx-mailmerge uv add docx-mailmerge poetry add docx-mailmerge ## Installing docx-mailmerge Before you install: Installation is straightforward with no runtime dependencies. However, the project is archived and the last release was in 2019, indicating the package is no longer actively maintained. License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions. Quickstart: pip install docx-mailmerge from mailmerge import MailMerge with MailMerge('input.docx') as document: document.merge(field1='value1', field2='value2') document.write('output.docx') Verify before relying: - Whether the package works reliably with Python versions beyond 3.4 as declared in classifiers - Whether merge operations handle complex docx structures beyond documented basic field and row merging - Current compatibility with recent versions of the Office Open XML format ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 215.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mail merge docx python, word document template merge, docx field replacement, bulk document generation, word template automation, merge fields docx, document template filling, document-automation, archived [View on SkillFed](https://skillfed.io/packages/docx-mailmerge) · [View on PyPI](https://pypi.org/project/docx-mailmerge/)