Domino Code Fragment

Code Name*
Count the number of documents in a view
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.118.164.121
Description*
Counts documents in the view "By Author" in the learning.nsf database.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Sub Initialize
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim count As Integer
Set db = New NotesDatabase( "", "learning.nsf" )
Set view = db.GetView( "By Author" )
Set doc = view.GetFirstDocument
count = 0
' begin counting documents
' stop when there are no more documents
Do Until doc Is Nothing
count = count + 1
Set doc = view.GetNextDocument( doc )
Loop
Messagebox( count )
End Sub