'Update 'Today' in Views: Option Public Option Declare Use "OpenLogFunctions" %REM Purpose: 'Update views relying on today's date 'If additional views are required, add to views List 'Ensure any column formula including "today:=" does not have line breaks and has the correct case Originated: PW v2.0 15/06/07 Process: Loop through the views in views List, loop through the columns, if @Contains("today:="), replace that date of format dd/mm/yyyy with today's date %END REM Sub Initialize Dim s As New NotesSession Dim adminp As NotesAdministrationProcess Dim thisdb As NotesDatabase Dim updateView As NotesView Dim todaydate As String, formula As String Dim views List As String Dim instrPos As Long On Error Goto logErr %REM Use this format views(VIEWNAME) = viewAlias %END REM views("forArchive") = "forArchive" Set thisdb = s.CurrentDatabase todayDate = Format(Today(), "dd/mm/yyyy") Forall viewName In views 'Loop through views Set updateView = thisdb.GetView(viewName) formula = updateView.SelectionFormula instrPos = Instr(formula, "today:=") If instrPos > 0 Then Mid$ (formula, InstrPos + 8, 10) = todayDate updateView.SelectionFormula = formula End If Set updateView = thisdb.GetView(viewName) If Not updateView Is Nothing Then Forall vc In updateView.Columns 'Loop through columns If vc.IsFormula Then formula = vc.Formula instrPos = Instr(formula, "today:=") If instrPos > 0 Then Mid$ (formula, InstrPos + 8, 10) = todayDate vc.Formula = formula End If End If End Forall End If End Forall 'Now we need to sign the database - otherwise the design element is signed with No Signature! Set adminp = s.CreateAdministrationProcess(thisdb.Server) Call adminp.SignDatabaseWithServerID(thisdb.Server, thisdb.FilePath, False) quit: Erase views 'Cleanup memory from the list Exit Sub logErr: Call LogError() Resume quit End Sub