Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate Microsoft Word documents using Sphinx

Tags:

Sphinx supports a few output formats:

  • Multiple HTML files (with html or dirhtml)
  • Latex which is useful for creating .pdf or .ps
  • text

How can I obtain output in a Microsoft Word file instead?

With another doc generator I managed to generate a single html output file and then convert it to Microsoft Word format using the Word application.

Unfortunately I don't know a way to generate either Word or the HTML single-page format.

like image 912
Andrea Francia Avatar asked May 13 '09 15:05

Andrea Francia


People also ask

Can you automate Word documents?

Now with Power Automate, there is an easier way. Microsoft Power Automate has a huge range of functionality and with the help of the native Word connector, it is possible to take a prepared Word document and populate it with data from Microsoft Dynamics 365.

How do I replicate data in Word?

Press Ctrl+C to copy the control to the Clipboard. Position the cursor where you want to repeat the control's selected value. Don't press Ctrl+V as you normally would to paste something. Instead, choose Paste Special from the Paste dropdown in the Clipboard group on the Home tab (Figure D).


1 Answers

The solution I use is singlehtml builder like andho mentioned in the comment, then convert the html to docx using pandoc. The following sample assumes the generated html would be located at _build/singlehtml/index.html

make singlehtml cd _build/singlehtml/ pandoc -o index.docx index.html 
like image 146
frogcoder Avatar answered Sep 26 '22 05:09

frogcoder