9 months ago
Sat Jul 6, 2024 10:37pm PST
Ask HN: Have you run Microsoft Word in headless mode?
Have you or your organization run Microsoft Word in headless mode? How do you do it, and why?

For example, "a node.js server on a Windows machine that takes a file, saves it onto disk and runs a Visual Basic application on it which itself starts Microsoft Word headless to [perform some operation]" [1]

I need to manipulate Word documents that include accurate page numbers for elements like Table of Contents and List of Figures. These dynamic elements are populated on first open by Word (with user approval)

I'd like to automate all of this, and potentially manipulate the resulting .docx afterward.

From my initial research, doing this well requires processing by Word's layout engine.

I need this to be available as a web service to another application written in Python.

Other solutions I've considered include using LibreOffice in a headless mode, or a commonly mentioned but high priced solution [2] Aspose.words.

[1] https://news.ycombinator.com/item?id=17425712

[2] https://products.aspose.app/words

comments:
add comment
loading comments...