Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 23, 2023 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/efeb1aa7a4dc5fa97969abc9249b9ef3 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/efeb1aa7a4dc5fa97969abc9249b9ef3 to your computer and use it in GitHub Desktop.
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