Java: parsing ms-word document using POI/HWPF
问题 I have a ms-word document (MS-Office 2003; non-xml). Within this document there is a string associated with a bookmark. Furthermore, the word document contains word-macros. My goal is to read the document with java, replace the string associated with the bookmark, and save the document back to word format. My first approach was using Apache POI HWPF: HWPFDocument doc = new HWPFDocument(new FileInputStream("Test.doc")); doc.write(new FileOutputStream("Test_generated.doc")); The problem with