The Problem (Q-score 7, ranked #6th of 32 in the Word VBA archive)
The scenario as originally posted in 2008
i’m looking for a way to programatically convert word documents in docx format to doc format without using ole automation. i already have a windows service that does this but it means installing office on a server and it is a little unreliable and not supported. i am aware of the aspose.words product, and i will try it out, but has anyone any recommendations for how to do this as simply, reliably, and cheaply as possible?
Why community consensus is tight on this one
Across 32 Word VBA entries in the archive, the accepted answer here holds elite answer (top 10 %%) status — meaning voters are unusually aligned on the right fix.
The Verified Solution — elite answer (top 10 %%) (+13)
Advisory answer — community consensus with reference links
Note: the verified answer below is a reference / advisory response rather than a copy-ready snippet.
One option without using OLE automation would be to wrap the converter dlls coming with compatibility pack in order to convert from docx to doc without automating Office.
This requires only that the Compatibility Pack of Office is installed on the machine.
The Office converter dlls convert from the document format that they support to RTF and/or from RTF to their document format using the interface ForeignToRtf/RtfToForeign. You can chain converters as you wish to convert from one format to another, e.g. to do a conversion DOCX -> RTF -> DOC.
You can get the SDK from Microsoft: http://support.microsoft.com/?scid=kb%3Ben-us%3B111716&x=16&y=7 which includes several samples on how to use existing converters. If I remember correctly there is already a command line wrapper sample included. Everything is C/C++ stuff.
You can find out which of the converter dlls are responsible for OpenXML conversion by looking at the following registry key:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftShared ToolsText ConvertersImportWord12
Let me know if you need further details on this.
Regards,
divo
When to Use It — vintage (14+ years old, pre-2013)
A top-10 Word VBA pattern — why it still holds up
Ranks #6th of 32 in the Word VBA archive. The only pattern ranked immediately above it is “How to open and manipulate Word document/template in Java?” — compare both if you’re choosing between approaches.
What changed between 2008 and 2026
The answer is 18 years old. The Word VBA object model has been stable across Office 2013, 2016, 2019, 2021, 365, and 2024/2026 LTSC, so the pattern still compiles. Changes that might affect you: 64-bit API declarations (use PtrSafe), blocked macros in downloaded files (Mark-of-the-Web), and the shift toward Office Scripts for web-first workflows.