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.
A package that can be used to merge two or more doc files together.
pip install python-docx
GUI ONLY :
pip install PySimpleGUI
Run '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
Copy the code from the file as it is,
import the required files and use the full power of docxcompose library
First.docx
Second.docx
Code Example
Merged Word File
NOTE: File will be saved when you close the application!
Submitted by Lakshay Sharma (LakshaySharma)
Download packets of source code on Coders Packet
Comments