Dim db As New NotesDatabase( "Mecca", "mail¥cbanner.nsf" )
template$ = db.DesignTemplateName
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
このサブルーチンを呼び出す例は次のようになります。
Call templateNotification( "Caracas", "mail4.ntf" )