Examples: DesignTemplateName property (NotesDatabase - LotusScript)
- This script gets the design template name of the database CBANNER.NSF.
Since CBANNER.NSF is a mail file, the method returns "STDR4MAIL."
Dim db As New NotesDatabase( "Mecca", "mail\cbanner.nsf" ) template$ = db.DesignTemplateName
- This sub notifies database managers that the design of their databases
is going to change. It takes the server (such as "Caracas") and file
of a template database (such as MAIL4.NTF) and sends mail to the managers
of all databases on the server that inherit from that template.
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" )