LOTUSSCRIPT/COM/OLE CLASSES
REM Globals Dim lastCaretID As Variant lastCaretID = "000" Sub Onselect(Source As Notesuiview) Dim session As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Set db = session.CurrentDatabase caretNoteID$ = Source.CaretNoteID If lastCaretID <> caretNoteID$ Then ' we only process if the highlighted row has changed lastCaretID = caretNoteID$ noteID$ = "NT00000" + caretNoteID$ Set doc = db.GetDocumentByID( caretNoteID$ ) moddate$ = Strleft(doc.LastModified, " ") ' we only care about the date createdate$ = Strleft(doc.Created, " ") If moddate$ > createdate$ Then Messagebox "This document has been modified since it was created",, _ "Modification alert" End If End If End Sub