We used to use jacob.
the method is
public static Integer getRangeEnd(String path) {
Integer endRange = 0;
ActiveXComponent app = new ActiveXComponent("Word.Application");
try {
app.setProperty("Visible", new Variant(false));
Dispatch docs = app.getProperty("Documents").toDispatch();
Dispatch doc = Dispatch.invoke((Dispatch) docs, "Open", Dispatch.Method,
new Object[] { path, new Variant(false), new Variant(true) }, new int[3]).toDispatch();
Dispatch content = Dispatch.get(doc, "Content").toDispatch();
Variant variant = Dispatch.get(content, "End");
endRange = variant.getInt();
Dispatch.call((Dispatch) doc, "Close", new Variant(false));
} catch(Exception e) {
e.printStackTrace();
endRange = 0;
} finally {
app.invoke("Quit", new Variant[] {});
}
return endRange;
}
Which method of your API do we need to replace?