I need to get some properties from all Notes databases on a particular server. At the moment I have a loop that successfully runs through the first few hundred databases and then crashes with “Object variable not set”. I have debugged the code and the script is unable to set db. I cannot find any problems with the db that the database fails on.
Dim curdoc As NotesDocument
Dim db As NotesDatabase
Dim directory As NotesDbDirectory
Dim template As String
Dim collection As NotesDocumentCollection
Set curdb = s.CurrentDatabase
Set directory = New NotesDbDirectory("Notes01")
Set db= directory.GetFirstDatabase( DATABASE )
Do Until db Is Nothing
Set db = directory.GetNextDatabase()
Print db.FilePath
Loop