You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Sean Tiley <st...@meraksystems.com> on 2006/12/20 21:31:18 UTC

Writing Word Documents

I am successfully opening a word document that is a Mail Merge document.
I can successfully locate all the merge fields and replace them with
data from a datasource,

Now I would like to create a new word document to write to disk, (that
contains the updated info), but I am having a heck of a time doing
so....


Can anyone help?

Thanks in advance.
Sean

 

 

 

 

 

 

 

 

 

 

 

 

 


Re: Writing Word Documents

Posted by Daniel Noll <da...@nuix.com>.
Rainer Schwarze wrote:
>> Now I would like to create a new word document to write to disk, (that
>> contains the updated info), but I am having a heck of a time doing
>> so....
>>
>> Can anyone help?
> 
> Hi Sean,
> 
> sorry for the ugly news, but the HWPF library is too incomplete to do this.
> Using RTF - as Angelo Zerr mentioned - looks like an easier solution (based
> on the assumption that you can live with RTF).

Another possibility is to use one of the newer Word formats.  Ever since 
2003, it has been possible to use an XML-based format, which is a lot 
easier to modify from external tools.

Daniel


-- 
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Writing Word Documents

Posted by Rainer Schwarze <rs...@admadic.de>.
At 21:31 20.12.2006, Sean Tiley wrote:
>I am successfully opening a word document that is a Mail Merge document.
>I can successfully locate all the merge fields and replace them with
>data from a datasource,
>
>Now I would like to create a new word document to write to disk, (that
>contains the updated info), but I am having a heck of a time doing
>so....
>
>Can anyone help?

Hi Sean,

sorry for the ugly news, but the HWPF library is too incomplete to do this.
Using RTF - as Angelo Zerr mentioned - looks like an easier solution (based
on the assumption that you can live with RTF).

best wishes, Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Writing Word Documents

Posted by Angelo zerr <an...@gmail.com>.
Hi Sean
I'm sorry, I have not answer for your question.
But If you can use RTF format, you could use RTFtemplate, which is RTF egine
RTF to RTF which merge data with MERGEFIELDS. You can found RTFtemplate at
http://rtftemplate.sourceforge.net/

Regards Angelo

2006/12/20, Sean Tiley <st...@meraksystems.com>:
>
> I am successfully opening a word document that is a Mail Merge document.
> I can successfully locate all the merge fields and replace them with
> data from a datasource,
>
> Now I would like to create a new word document to write to disk, (that
> contains the updated info), but I am having a heck of a time doing
> so....
>
>
> Can anyone help?
>
> Thanks in advance.
> Sean
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>