Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating a MS Word Document through Java

1 view
Skip to first unread message

Ron Sibayan

unread,
Sep 29, 2005, 8:30:23 PM9/29/05
to
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

unread,
Sep 30, 2005, 12:34:49 AM9/30/05
to
On 29 Sep 2005 17:30:23 -0700, "Ron Sibayan" <siba...@tiscali.co.uk>
wrote or quoted :

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
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Paul Cager

unread,
Sep 30, 2005, 4:11:58 AM9/30/05
to
Roedy Green wrote:
> On 29 Sep 2005 17:30:23 -0700, "Ron Sibayan" <siba...@tiscali.co.uk>
> wrote or quoted :
>
> >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.<<snip>>

>
> 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

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

juh...@gmail.com

unread,
Sep 30, 2005, 4:38:28 AM9/30/05
to
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.

Roedy Green

unread,
Sep 30, 2005, 5:11:48 AM9/30/05
to
On 30 Sep 2005 01:11:58 -0700, "Paul Cager" <news...@paulcager.com>
wrote or quoted :

>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.

Ron Sibayan

unread,
Sep 30, 2005, 7:51:55 AM9/30/05
to
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

0 new messages