Convert a document between DOCX and MHTML formats.

1. Usage

uniword convert INPUT OUTPUT

2. Options

--from, -f

Input format (docx or mhtml). Default: auto-detected from file extension.

--to, -t

Output format (docx or mhtml). Default: auto-detected from file extension.

--verbose, -v

Show detailed conversion progress.

3. Examples

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

4. How it works

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.