wiki:TutorialHtml

Howto: convert a docx to HTML using Java

See org.docx4j.samples.CreateHtml.java for an example. The example takes the specified docx file, and outputs the HTML to System.out.

But you can write the HTML to any javax.xml.transform.Result object.