Merge Two Docx files into a Single one in Python
A package that can be used to merge two or more doc files together written purely in Python. Both code and GUI available for usage and further development.
Merge Two Docx files into a Single one in Python
A package that can be used to merge two or more doc files together.
How to use
Installing the base package
pip install python-docx
GUI ONLY :
pip install PySimpleGUIRun 'DocxMergerGUI.py' directly.
Add 'DocxMerger.py' to required location where you need to merge the files
After installing the package import:
from DocxMerger import merge_docx
Then use the following commands:
merge_docx("first.docx", "second.docx")
creates a docx file named 'merged.docx'
merge_docx("first.docx", "second.docx", name="foo.docx")creates a docx file named 'foo.docx'
Replace "first.docx", "second.docx" with the locations of two files you need to merge
OR
Copy the code from the file as it is,
import the required files and use the full power of docxcompose library
Running Example
Original Word Files:
First.docx

Second.docx

Code Example

Merged Word File

GUI


NOTE: File will be saved when you close the application!
Project Files
| .. | ||
| This directory is empty. | ||