Sub templateNotification(server As String, file As String)
Dim templateDb As NotesDatabase
Dim templateName As String
Dim db As NotesDatabase
Dim directory As NotesDbDirectory
Dim doc As NotesDocument
Set templateDb = New NotesDatabase( server, file )
templateName = templateDb.TemplateName
Set directory = New NotesDbDirectory( server )
Set db = directory.GetFirstDatabase( DATABASE )
While Not ( db Is Nothing )
If ( db.DesignTemplateName = templateName ) Then
Call db.Open( "", "" )
Set doc = New NotesDocument( db )
doc.Form = "Memo"
doc.Subject = "Template changes in " & templateName
doc.Body = "The template " & templateName & _
" will be modified tomorrow."
Call doc.Send( False, db.Managers )
End If
Set db = directory.GetNextDatabase
Wend
End Sub
A call to this sub might look like this:
Call templateNotification( "Caracas", "mail4.ntf" )