Programatically saving a view

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

Subject: Programatically saving a view

Any reason why you can’t just sign all the notes in the db with your id? That would count as a modification.

Subject: Programatically saving a view

It should work, if you insert one more line

Set doc = db.getdocumentbyid(idnumber$)

Call doc.Sign()

Call doc.save(True,True)