Skip to content

markdown-to-word-converter

Convert a Markdown (.md) file to a Word (.docx) document using Pandoc. Use when the user asks to convert markdown to Word.

Source: .opencode/skills/markdown-to-word-converter/SKILL.md — site rebuilt 2026-09-05.


Markdown to Word Converter

This skill converts a Markdown (.md) file to a Word (.docx) document using the industry-standard Pandoc tool.

Prerequisites

  • Pandoc must be installed on the system.
  • To check if it is installed, run pandoc --version.
  • If Pandoc is NOT installed, install it using winget:
    winget install --id JohnMacFarlane.Pandoc -e --accept-package-agreements --accept-source-agreements
    
    (Note: You may need to run this command, wait for it to complete, and if pandoc is still not on PATH in your current shell, you can invoke it by closing/opening a new shell or running refreshenv / specifying the install path).

Instructions

  1. Determine the absolute path of the input .md file.
  2. Determine the desired absolute path for the output .docx file (if the user didn't specify, default to the same directory and base name with a .docx extension).
  3. Run the Pandoc command to convert the file:
    pandoc "C:\absolute\path\to\input.md" -o "C:\absolute\path\to\output.docx"
    
  4. Confirm with the user that the document has been successfully converted.

Advanced (Optional)

If the user requests a specific style, you can use a reference docx file:

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