I have done for .docx files as below but for .doc file it is throwing InvalidFormatException.
public boolean checkForEmbeddedObj(File wordFile){
InputStream inStream = new FileInputStream(wordFile);
XWPFDocument xwDoc = new XWPFDocument(inStream );
return xwDoc.getAllEmbedds().isEmpty();
}
Any idea How can I do the same for .doc files ?