Hello,
I have a docx with several bookmarks. I want to cross these bookmarks and in
each of them to write information.
I can get de name each bookmark, but I can't write in them.
XWPFDocument eldocx = new XWPFDocument(new FileInputStream(pathplantilla1));
Iterator<XWPFParagraph> itParagraph = eldocx.getParagraphsIterator();
while (itParagraph.hasNext()){
XWPFParagraph paragraph = itParagraph.next();
CTP ctp = paragraph.getCTP();
java.util.List<CTBookmark> bookmarks = ctp.getBookmarkStartList();
Iterator itbookmarks = bookmarks.listIterator();
while (itbookmarks.hasNext()){
CTBookmark bookmark = (CTBookmark) itbookmarks.next();
System.out.println("Name : " + bookmark.getName());
String bookmarkName = bookmark.getName();
if (bookmarkName == "Empresa") {
// I need HELP !!!
}
}
}
thank
silvia
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/I-need-write-in-a-bookmark-in-docx-tp4798359p4798359.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]