Thanks Hashem. Never expected this piece of code to be used as it is now. The original was written as a proof of purpose really. If I have the time, I will try to post the full chunk again with your modifiication included.
Yours Mark B PS I am still convinced there is a better way to crack this particular problem as there are many different scenarios that the code cannot adequately address. The xml markup is subtly different when you are dealing with, for example, a bookmarked table cell and a bookmarked row. Capturing that is the challenge to my mind. Further, I think that the entire philosophy of the code ought to be changed so that it returns the object that was bookmarked allowing the user to find out what that is and then modify it accordingly - text was only the subject bcause the original question asked specifically about getting the contents of a bookmark as text. So, to pursue the example above a little further, it would return either a table cell or a row, the user could then test to find out what had been returned and then modify that accordingly. This would make it far easier to deal with many different possible combinations of inserting 'something' into a document at a bookmarked positions I think. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-read-the-value-of-bookmarks-docx-tp5710184p5710819.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]
