/***** *** getEmptyDocumentCollection() *** returns an empty NotesDocumentCollection-Object *****/ function getEmptyDocumentCollection(){ var dc:NotesDocumentCollection = null; try{ dc = database.getAllDocuments(); dc.subtract( database.getAllDocuments() ); }catch(e){} return dc; } /*** how to use ***/ var hlpDC:NotesDocumentCollection = getEmptyDocumentCollection(); var hlpDoc:NotesDocument = database.getAllDocuments().getFirstDocument(); hlpDC.addDocument ( hlpDoc ) hlpDC.getCount();