poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aram Mirzadeh <...@mbcli.com>
Subject Updating Custom Properties in XWPF
Date Mon, 03 Aug 2009 20:04:40 GMT

I need to update some custom properties in a docx.  I've gotten as far
as reading the variables:

public class UpdateWordDocument {

	public static void main(String[] args) throws Exception {
		XWPFDocument doc = new XWPFDocument(POIXMLDocument.openPackage(fileName);
		CustomProperties props = doc.getProperties().getCustomProperties();
		CTProperty[] ctp = props.getUnderlyingProperties().getPropertyArray();

		for (CTProperty foo : ctp) {

I don't believe the code exists to update these property values and
write them back to the file.  If someone can point me to the proper
package and class, I can take a shot at providing a patch back.



View raw message