Question posted 2008 · +6 upvotes
How do I load MS Word document (.doc and .docx) to memory (variable) without doing this?:
wordApp.Documents.Open
I don’t want to open MS Word, I just want that text inside.
You gave me answer for DOCX, but what about DOC? I want free and high performance solution – not to open 12.000 instances of Word to process all of them. 🙁 Aspose is commercial product, and 900$ is a way too much for what I do.
Accepted answer +4 upvotes
You can use wordconv.exe which is part of the Office Compatibility Pack to convert from doc to docx.
Just call the command like so: “C:Program FilesMicrosoft OfficeOffice12wordconv.exe” -oice -nme InputFile OutputFile
I’m not sure if you need word installed for it to run but it does work. I use it locally as a windows shell command to convert old office files to 2007 format whenever I want.
Top ms-word Q&A (6)
- XML – adding new line +19 (2012)
- How to open and manipulate Word document/template in Java? +18 (2012)
- Why does the file utility identify Microsoft Word files as CDF? What is this CDF? +15 (2011)
- Version Control for word documents +13 (2008)
- programatically convert word docx to doc without using ole automation +13 (2008)
- What makes Microsoft-Word-generated HTML documents so large in code? +12 (2015)
ms-word solutions on this site
.