Off the top of my head, two means come to mind: 1) Use JNI to interact with C++ code that uses COM to interact with Word. (GA!) 2) Emit RTF which Word will read in just fine but which is a lot easier to generate. Not really my area of expertise so others may have better ideas. hth, bear
How about just writing out a text file (possibly with a .txt extension) and reading it into Word. Word should convert the file automatically. You can then save the file as a .doc file and then apply any formatting you need using macros, etc. to expedite the process. If this is a one shot deal, I would favor this approach.
I would definitely prefer to use Java to generate RTF documents than Word documents. Word is very proprietary and this year's Word document format is not next year's Word document format is not last year's Word document format. I have not yet run across an API that just outputs Word documents from Java. I know the group working on the POI project over at Jakarta are developing such an API to generate Word '97 documents. I'm not sure how far along they are. Take a look at their project site for more information. Mueller Und Stein offer a free Java Bean to control Microsoft Word. Otherwise, perhaps there is an indirect path through XML to get from Java to Word (and perhaps back again). Good Luck.