thuliobuarque / java2word

Automatically exported from code.google.com/p/java2word
0 stars 0 forks source link

Question about java2Word methods implementation #91

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is there an insert method, and not just addelement?  Despite any lack of 
support, is there any easy way to do this with what appears to be an xml 
oriented approach?

How is it presently possible, despite lack of support, to populate a 
Document2004 object from a word document file that is already there

Original issue reported on code.google.com by stargate...@live.co.uk on 20 Mar 2012 at 2:31

GoogleCodeExporter commented 8 years ago

I imagine you want to insert some element in a specific position? addelement 
adds on the current position, most likely to be at the end of the document. 

You can't currently populate a Document2004 from a file. Maybe take a look at 
the template solution to see if it helps you to achieve what you want.

Leonardo 

Original comment by leonardo...@gmail.com on 20 Mar 2012 at 3:19

GoogleCodeExporter commented 8 years ago
Indeed, it seems as though you can only append new information.

Is there going to be anny effort to facilitate Document2004 population via
file reading? Or inserting?  Or changing properties somewhere in the middle of 
the document?

I would highly recommend doing so; it would be well worth the effort for the 
software community.

Original comment by stargate...@live.co.uk on 20 Mar 2012 at 11:34

GoogleCodeExporter commented 8 years ago
It is technically possible to do if and only if the document has been saves as 
Word XML 2003 +. If you save it as .dox or .docx, they are a sort of zipped 
folder structure and would be much harder. I will think about a way to read and 
populate a Document2004 but can't guarantee when I will have time. Work, soccer 
and drinks are taking all my time right now... 
This has been requested by other guys before.

cheers
Leonardo 

Original comment by leonardo...@gmail.com on 21 Mar 2012 at 12:00