Wenn die URL hilft, gerne:
notes:///MailContainer.nsf/0/C12577F5003BE607C12577E500404908?OpenDocument
Hier der Quelltext, mit dem ich versuche das Ganze umzusetzen:
NotesThread.sinitThread();
Session nSessLocal = NotesFactory.createSessionWithFullAccess();
// Load database with mail which should be displayed
Database currentMailDb = nSessLocal.getDatabase(null, unzippedMailPath, false);
if (!currentMailDb.isOpen()) {
currentMailDb.open();
}
Document mailDoc = currentMailDb.getAllDocuments().getLastDocument();
mailDoc.replaceItemValue("LotusNotesForm", "Memo");
mailDoc.save();
// Get database where the document should be copied in
Database showMailDb = nSessLocal.getDatabase(null, "C:\\temp\\MailContainer.nsf", true);
if (!showMailDb.isOpen()) {
showMailDb.open();
}
// delete all previous inserted documents
showMailDb.getAllDocuments().removeAll(true);
mailDoc.copyToDatabase(showMailDb);
String urlstring = "notes://" + showMailDb.getServer() + "/" + showMailDb.getFileName() +"/0/" + mailDoc.getUniversalID()+"?OpenDocument";
URL url = new URL(urlstring);
Desktop.browse(url);
NotesThread.stermThread();
Klar, aber es hat sich nicht viel geändert:
NotesThread.sinitThread();
Session nSessLocal = NotesFactory.createSessionWithFullAccess();
// Load database with mail which should be displayed
Database currentMailDb = nSessLocal.getDatabase(null, unzippedMailPath, false);
if (!currentMailDb.isOpen()) {
currentMailDb.open();
}
Document mailDoc = currentMailDb.getAllDocuments().getLastDocument();
mailDoc.replaceItemValue("LotusNotesForm", "Memo");
mailDoc.save();
// Get database where the document should be copied in
Database showMailDb = nSessLocal.getDatabase(null, "C:\\temp\\MailContainer.nsf", true);
if (!showMailDb.isOpen()) {
showMailDb.open();
}
// delete all previous inserted documents
showMailDb.getAllDocuments().removeAll(true);
mailDoc = mailDoc.copyToDatabase(showMailDb);
URL url = new URL(mailDoc.getNotesURL());
Desktop.browse(url);
NotesThread.stermThread();
Die Notes URL sieht jetzt wie folgt aus: notes:///__C125768200274FA8.nsf/0/C125768200274FA8C12577E500404908?OpenDocument
Ach ja, das Ganze läuft ohne Exception durch...