d.copyAllItems(newDoc, true);
newDoc.save();
}
public void copyEnvironment(DominoDocument doc, String name) throws NotesException, IOException {
View v = ExtLibUtil.getCurrentDatabase().getView("AllEnvironments");
ViewEntry ve = v.getEntryByKey(name);
if(ve!=null) {
Document d = ve.getDocument();
d.copyAllItems(doc.getDocument(), true);
doc.setDocument(doc.getDocument());
}
}