This question already has an answer here:
import org.apache.poi.hwpf.extractor.WordExtractor;
public class Test {
public static void main(String args[]){
try {
WordExtractor extractor = new WordExtractor(new FileInputStream("/Users/testuser/myworddoc.docx"));
}
catch (IOException ioe){
ioe.printStackTrace();
}
}
}
When executing this code I get the following error message:
"The supplied data appears to be in the Office 2007+XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data."
How do I modify the code to resolve this issue?