Domino Code Fragment

Code Name*
Mail notification that a new document was created from a web client.
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.22.248.208
Description*
Web mail notification that a new document was created from the web.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:

Agent Name: (SendMail) | SendMail

Run: Manually From Actions Menu

Documents Act Upon: Run once @Commands may be used

Sub Initialize
    Dim session As New NotesSession
    Dim doc As NotesDocument
    Set doc = session.DocumentContext
    Dim db As NotesDatabase
    Dim newDoc As NotesDocument
    Dim rtitem As NotesRichTextItem
    Set db = session.CurrentDatabase
    If doc.IsNewNote Then
         Dim Status As Variant
         Status = doc.GetItemValue( "Confirmed" )
         If Status( 0 ) = "NO" Then
              Set newDoc = New NotesDocument( db )
              Set rtitem = New NotesRichTextItem(newDoc, "Body" )
              Call rtitem.AppendDocLink(doc, "Doc Link" )
              newDoc.Subject = "New Training Registration"
              newDoc.SendTo = "Mary Reed"
              newDoc.Form = "Memo"
              newDoc.Send( True )
         End If
    End If
End Sub