1 つ以上の文書を文書コレクションから削除します。
remove(removalspecifier:NotesDocument) : void
remove(removalspecifier:NotesDocumentCollection) : void
remove(removalspecifier:NotesForm) : void
remove(removalspecifier:int) : void
remove(removalspecifier:NotesNoteCollection) : void
remove(removalspecifier:string) : void
remove(removalspecifier:NotesView) : void
// Open DXL file
var stream:NotesStream = session.createStream();
var filename:string = "c:¥¥dxl¥¥";
filename = filename + database.getFileName();
filename = filename.substring(0, filename.length() - 3) + "dxl";
if (stream.open(filename)) {
requestScope.status = "Opened " + filename;
stream.truncate();
// Create note collection
var nc:NotesNoteCollection = database.createNoteCollection(false);
nc.setSelectDocuments(true);
nc.buildCollection();
// Remove note if it contains word example
var id:string = nc.getFirstNoteID();
while (id.length() > 0) {
var tmpid = nc.getNextNoteID(id);
var doc:NotesDocument = database.getDocumentByID(id);
var subject:string = doc.getItemValueString("Subject");
if (subject.toLowerCase().indexOf("example") >= 0) {
nc.remove(id);
}
id = tmpid;
}
// Export note collection as DXL
var exporter:NotesDxlExporter = session.createDxlExporter();
var output:string = exporter.exportDxl(nc);
stream.writeText(output);
stream.close();
requestScope.status = requestScope.status + "¥n" + nc.getCount() +
" notes written to " + filename;
} else {
requestScope.status = "Cannot open " + filename;
}