pandoc input.md --reference-doc=template.docx -o output.docx

Category: Media & Conversion

pandoc input.md --reference-doc=template.docx -o output.docx

Convert Markdown to DOCX with a style template

Converts to DOCX using template.docx for styles like fonts, heading colors, and margins, instead of pandoc's defaults. Generate a starting template with pandoc --print-default-data-file reference.docx. Re-run to apply your styling.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.