R
Roland Leisch
Hello!
Im using a Java-COM bridge to access Word from Java. I have managed to
create a OLEContainer containing a new word-document. My problem now is,
that if I try to open an existing Word document using Documents.open the
new document is opend in a new window and not in the ole container - can
anyone help?
Thanks in advance!
_container = new OleContainer();
_container.createObject(DOCUMENT_PROGID);
_DocumentImpl document = new _DocumentImpl(_container.getOleObject());
Documents documents = document.getApplication().getDocuments();
documents.open2002(new
Variant("c:\\test.doc"),Variant.createUnspecifiedParameter(), new
Variant(true),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),
Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter());
documents.item(new Variant("test.doc")).activate();
Im using a Java-COM bridge to access Word from Java. I have managed to
create a OLEContainer containing a new word-document. My problem now is,
that if I try to open an existing Word document using Documents.open the
new document is opend in a new window and not in the ole container - can
anyone help?
Thanks in advance!
_container = new OleContainer();
_container.createObject(DOCUMENT_PROGID);
_DocumentImpl document = new _DocumentImpl(_container.getOleObject());
Documents documents = document.getApplication().getDocuments();
documents.open2002(new
Variant("c:\\test.doc"),Variant.createUnspecifiedParameter(), new
Variant(true),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),
Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter(),Variant.createUnspecifiedParameter());
documents.item(new Variant("test.doc")).activate();