...and I should add that I have never done this myself. I have been working on a possible patch for the API - if anyone wants it of course - that would allow you to insert at a bookmark (well either before or after the bookmark to be exact and preserving any formatting) and the technique I described was what I used; get the node from the bookmark, and either insert in front of the bookmarkStart tage or step to the bookmarkEnd element and then insert a node into the document (the new run) at that point. That worked well and I reckon you should be able to do likewise to get at the node and then it's content.
Mark B PS There may be an additional wrinkle here as the text is likely kept in the text node which is a child of the run. So I think you will need to work from the bookmarkStart node and get each run node in turn. When you have a run, get that node's child nodes which should be text nodes I think, and they will likely hold what you are after. Have a go yourself and if you make any progress please post here. I cannot do any work on this myself for quite a while as I have few jobs backing up now. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-read-the-value-of-bookmarks-docx-tp5710184p5710188.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]
