Sub Initialize ' gets all views and asks for a refresh ' useful to keep views "active" Dim s As New NotesSession Dim db As NotesDatabase ' this db Dim nnC As NotesNoteCollection ' collection of views Dim nid As String ' note id of each note in nnc (view) Dim doc As NotesDocument ' getting view notes by id Dim dItem As NotesItem ' title of view note of doc Dim dvtitle As String ' alias/title of view Dim dV As NotesView ' actual view object with refresh for doc Set db = s.CurrentDatabase Set nnC = db.CreateNoteCollection(False) ' start emply nnC.SelectViews = True Call nnC.BuildCollection nid = nnC.GetFirstNoteId() While Not (nid = "") ' get the "document" for the view and then its title Print nid Set doc = db.GetDocumentByID(nid) If (doc Is Nothing) Then Print "No doc for id: " & nid "." Else Set dItem = doc.GetFirstItem("$TITLE") If (dItem Is Nothing) Then Print "Skipped " & nid & ". No title, may not be a view." Else Print "Title: " & dItem.Text & "." dvtitle = Strrightback( dItem.Text, "|", 5 ) If Not (dvtitle="") Then ' get view and finally refresh Set dV = db.GetView(dvtitle) If Not (dV Is Nothing) Then Call dV.Refresh() Print "Refreshing view " & dvtitle End If End If End If End If ' get next id dvtitle = "" Set dV = Nothing Set dItem = Nothing Set doc = Nothing nid = nnC.GetNextNoteId(nid) Wend