All,

Is it possible to use POI to modify the document summary info section from
an office document. I would like to add some custom properties to Excel,
Word and Powerpoint files.
I tried a word file but when I write the document with poi the summary
information is not in the new document and even some entries from the
original document like "comment" are missing.

I used the following code and poi-3.1 final:


===========
POIFSFileSystem fs = new POIFSFileSystem(new
FileInputStream("d:/temp/Test.doc"));
HWPFDocument doc = new HWPFDocument(fs);
DocumentSummaryInformation docSummary = doc.getDocumentSummaryInformation();
CustomProperties custProps = docSummary.getCustomProperties();
custProps.put("MyExtrAttribute", "Test value");
doc.write(new FileOutputStream("d:/temp/Test2.doc"));
============

If this is not possible with POI yet maybe somebody knows another
API/Product to modify summary information with java?

Thanks,

Marcus

Reply via email to