This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi. Does anybody have any experience with using COM objects with Java? I specifically need to open word, open a document and do some stuff with it. What libraries have you used? Any tutorials?
Hi guys,
thanks for your answers.
@Paul: as far as I know, POI allows me to manipulate the documents from Java code. This is not what I need to do. I will give the main use case - the user creates a Word template file (dot) with fields from a data source. Then, using our application, they will search for some data, export it do a data source that Word supports (like RTF file for instance), and will open Word with the template and the data source merged. That's it, we don't have to do anything else.
Please, if I am wrong don't hesitate to tell me, if there is a simpler approach I will most certainly consider it. Please note that opening Word is a requirement. If Word supported command line switches that take a tempalte and a data source as input, I could simply fire it up with the usual Java Process API, but I did some research and it looks like that using Word as a COM object is the only way to go. Also, I had some bad experiences with POI and Docs some time ago (it was fine for Xls though).
@Ulf: thanks for the link. Currently I am playing a bit with JACOB, and it looks fine. I didn't know about Jawin and the IBM solution, will take a look at that, thanks.