Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Pass a file name as a string to the Document constructor that accepts a string to open an existing document from a file
Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(AsposeOpenExistingDoc.class);
Document doc = new Document(dataDir + "document.doc");
FileInputStream is passed to the constructor of HWPFDocument to open an existing document.
Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(ApacheOpenExistingDoc.class);
HWPFDocument doc = new HWPFDocument(new FileInputStream(
dataDir + "document.doc"));
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.