Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 23, 2023 18:58
Convert HTML to Word DOCX DOC in Python
import aspose.words as aw
# Load the HTML file from disk
doc = aw.Document("Document.html")
# Save the HTML file as Word DOCX document
doc.save("html-to-word.docx")
@bitplane
Copy link

Warning to anyone arriving from a web search like me, the code above is non-free and creates watermarked output that begs for your pennies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment