Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / September 2005

Tip: Looking for answers? Try searching our database.

Creating a MS Word Document through Java

Thread view: 
Ron Sibayan - 30 Sep 2005 01:30 GMT
Dear All,

I am trying to understand the best method for creating a Microsoft Word
document using Java. eventually the document will need to have merge
fields already placed on it and rather than being a new doc, it will be
opening a standard template. from what i can gather, it seems as though
MS don't want Java to have this sort of functionality.  Am i just
flogging a dead horse?  your advise would be greatly apreciated.

Many thanks

Ron Sibayan
Roedy Green - 30 Sep 2005 05:34 GMT
>I am trying to understand the best method for creating a Microsoft Word
>document using Java. eventually the document will need to have merge
>fields already placed on it and rather than being a new doc, it will be
>opening a standard template. from what i can gather, it seems as though
>MS don't want Java to have this sort of functionality.  Am i just
>flogging a dead horse?  your advise would be greatly apreciated.

The easy way is to create an RTF document. See
http://mindprod.com/jgloss/jtextpane.html

another way is http://mindprod.com/jgloss/poi.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Paul Cager - 30 Sep 2005 09:11 GMT
> >I am trying to understand the best method for creating a Microsoft Word
> >document using Java. eventually the document will need to have merge
[quoted text clipped - 5 lines]
>
> another way is http://mindprod.com/jgloss/poi.html

RTF / HTML documents would certainly work, but it looks as though you
want to use some Word-specific features such as templates and fields?
If so then you might want to drive Word's API directly. IBM's
Bridge2Java (also known as "Interface Tool") can access many Windows
COM objects, including Word.

http://www.alphaworks.ibm.com/tech/bridge2java

You would need to be running on a Windows machine with Word installed.

Paul
Roedy Green - 30 Sep 2005 10:11 GMT
>RTF / HTML documents would certainly work, but it looks as though you
>want to use some Word-specific features such as templates and fields?
>If so then you might want to drive Word's API directly. IBM's
>Bridge2Java (also known as "Interface Tool") can access many Windows
>COM objects, including Word.

there are a number of com tools. I have them listed under
http://mindprod.com/jgloss/excel.html

One of them might also work.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Ron Sibayan - 30 Sep 2005 12:51 GMT
Thanks Guys,

I should have actually checked the history of post as i see this
question has been asked several times before :/

Thanks for your patience though, I think the jakarta POI thing will
sort me out

Ron
juhunu@gmail.com - 30 Sep 2005 09:38 GMT
Jakarta POI is a gud choice for these kind of works..

Checkout POI at  http://jakarta.apache.org/poi/hwpf/index.html

It has a very big API to work with MS word, Excel..from Java.

Also it is an open source.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.