Can I just check a single point with you please? Are you opening a template file using POI, modifying that file and then saving it back again as a .docx? If this is the case, then POI does not support this sort of operation at all as far as I am aware. There are other features of the xml markup that indicate to the Word application when it is working with a template file rather than a true document file. POI does not modify these features when you simply change the file extension and that has been one cause of problems in the past. Obviously, I do not know that this is the cause of the problems in this case but fully expect that it is. To test my hypothesis, use Word to open one of your template files and re-save it as a document (.docx). Open this newly created (converted) document using POI and try the modifications on it, I suspect that the problems will have gone away.
Yours Mark B PS The code I submitted is not a part of the POI project but an example to help others out and it was never anything other than beta code at best. I do not offer on-going support for it and, if you want it to operate differently, that is very much up to you to implement. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-read-the-value-of-bookmarks-docx-tp5710184p5710729.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
