String oldName = ((CTBookmark)o).getName();
String newName = oldName + "_" + instanceNumber ; // can't start with a number
((CTBookmark)o).setName(newName);
for (Object ref : rt.refs) {
Text fieldInstr = (Text)ref;
String fieldVal = fieldInstr.getValue();
if (fieldVal.contains("REF ")
&& fieldVal.contains(" " + oldName + " ") ) {
fieldInstr.setValue(fieldVal.replace(oldName, newName));
}
}
}
// find the closing point tag