Database Property for Document Count

I have an agent that opens a person doc, grabs the mailserver + mailfile then uses getdatabase to open mail database. I am using maildb.percentused and maildb.size but also need the document count. Is there an equivalent to the above for document count (hoping so since on same tab)? …maildb.count or something. I realize that the document count includes to dos, configuration docsm calendar entries, emails, etc. Is there a way to grab #s specific to emails and calendar entries?

Subject: Database Property for Document Count

You could try notesDatabase.AllDocuments.Count.

/Peter

Subject: RE: Database Property for Document Count

Thanks Peter… was in the midst of trying the following:

	Set mailview1 = maildb.GetView( "($All)" )            

	doccount = mailview1.EntryCount  

	

	pdoc.docnum = doccount

	

	Set mailview2 = maildb.GetView( "Calendar" )            

	calcount = mailView2.EntryCount  

	

	pdoc.calnum = calcount

This addition (was already grabbing mail size & % used) has caused the processing time to exceed expectations. Is it the kind of request? I went from 15-20 minutes on 2500 documents to 2 hours! I would like to try yours… how would I used it? …in place of the all entries above?

Subject: RE: Database Property for Document Count

Yes. It would give you the count of all documents in the DB, no need to access views (that might need index updates, which takes time). It it actually a NotesDocumentCollection containing all documents. Count is the number of documents in the collection.

/Peter