Convert a document between DOCX and MHTML formats.
uniword convert INPUT OUTPUT
--from
-f
Input format (docx or mhtml). Default: auto-detected from file extension.
docx
mhtml
--to
-t
Output format (docx or mhtml). Default: auto-detected from file extension.
--verbose
-v
Show detailed conversion progress.
Convert DOCX to MHTML:
uniword convert input.docx output.doc
Convert MHTML to DOCX with verbose output:
uniword convert input.doc output.docx --verbose
Specify formats explicitly (useful for unusual file extensions):
uniword convert input.mht output.docx --from mhtml --to docx
The command loads the input document with DocumentFactory.from_file, which auto-detects the format, then saves it with the target format. All content, styles, and formatting are preserved during conversion.
DocumentFactory.from_file