LOTUSSCRIPT/COM/OLE CLASSES
Examples: OpenMailLog method
1. This agent script opens up a mail log. When the Close method is called, the mail memo gets sent to Thalia Ruben, with "Here's the Linguist Log" in the Subject. Actions and errors are in the Body of the memo.
Sub Initialize
Dim currentLog As NotesLog
Set currentLog = New NotesLog( "Linguist Log" )
Call currentLog.OpenMailLog _
( "Thalia Ruben", "Here's the Linguist Log" )
'...log some actions and errors...
currentLog.Close
End Sub
2. This agent script opens up a mail log that gets sent to the owner of the current agent. For example, if Susanna Tallan owns the Archiving Agent in the Project Histories database, the memo gets sent to Susanna, with "Archiving Agent in Project Histories" in the Subject. Actions and errors are in the Body of the memo.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim agent As NotesAgent
Set db = session.CurrentDatabase
Set agent = session.CurrentAgent
Dim currentLog As NotesLog
Set currentLog = New NotesLog( agent.Name )
Call currentLog.OpenMailLog _
( agent.Owner, agent.Name & " in " & db.Title )
'...log some actions and errors...
Call currentLog.Close
End Sub
See Also
OpenMailLog method
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary