This script sets the value of the PurgeDate item in a document,
based on when the document was last modified. If it was modified 14
or more days ago, it sets the PurgeDate to today. If it was modified
between seven and thirteen days ago, it sets the PurgeDate to seven
days from today.Dim doc As NotesDocument
Dim days As Integer
'...set value of doc...
days = Cint( Date - doc.LastModified )
If days > 14 Then
doc.PurgeDate = Date
Else
If days > 7 Then
doc.PurgeDate = Date + 7
End If
End If
Call doc.Save( True, True )