1 つ以上の文書を文書コレクションに追加します。
add(removalspecifier:NotesDocument) : void
add(removalspecifier:NotesDocumentCollection) : void
add(removalspecifier:NotesForm) : void
add(removalspecifier:int) : void
add(removalspecifier:NotesNoteCollection) : void
add(removalspecifier:string) : void
add(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.buildCollection();
// Add document if it contains word example
var dc:NotesDocumentCollection = database.getAllDocuments();
var doc:NotesDocument = dc.getFirstDocument();
while (doc != null) {
var subject:string = doc.getItemValueString("Subject");
if (subject.toLowerCase().indexOf("example") >= 0) {
nc.add(doc.getNoteID());
}
var tmpdoc:NotesDocument = dc.getNextDocument(doc);
doc.recycle();
doc = tmpdoc;
}
// 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;
}