Hi there,
I am trying to programmatically save all the views in a database I have. I have written the following code but i don’t think it is woring because the view is not showing as being updated by me
Dim session As New notessession
Dim db As notesdatabase
Dim nc As notesnotecollection
Dim doc As notesdocument
Set db = session.currentdatabase
'Forall v In db.views
' Call v.refresh
'End Forall
Set nc = db.createnotecollection(False)
nc.SelectViews = True
Call nc.buildcollection
idnumber$ = nc.getfirstnoteid
Do While (idnumber$ <> "")
'get the view into a notes document
Set doc = db.getdocumentbyid(idnumber$)
Call doc.save(True,True)
idnumber$ = nc.getnextnoteid(idnumber$)
Loop