poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Sepulveda <roger.planetgr...@gmail.com>
Subject Re: How to read the value of bookmarks? (docx)
Date Wed, 30 Jan 2013 12:58:38 GMT
Hello, I made the following modification for making the program work for
bookmarks in the header and the footer, it works fine in my tests. I thought
it would be nice to have it somewhere in the forum. This is my first time
doing something in POI so any revisions would be very appreciated.From your
main method...
            // Firstly, deal with any paragraphs in the body of the
document.            this.procParaList(this.document.getParagraphs(),
bookmarkName, bookmarkValue, where);                        // Then deal
with any paragraphs in the headers of the document.           
for(XWPFHeader head: this.document.getHeaderList()){               
this.procParaList(head.getParagraphs(), bookmarkName, bookmarkValue, where);           
}                        // Then deal with any paragraphs in the footers of
the document.            for(XWPFFooter foot:
this.document.getFooterList()){               
this.procParaList(foot.getParagraphs(), bookmarkName, bookmarkValue, where);           
}            ...




--
View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-read-the-value-of-bookmarks-docx-tp5710184p5712021.html
Sent from the POI - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message