LotusScript agent to send all field values to email recipient
LotusScript agent to send all field values to email recipient
This agent sends an email with the body containing all values for each field in the currently-opened document. It does not sort the fields by name, but you can find code that does elsewhere on this site by searching for "Bubble".
Sub Initialize Dim workspace As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim doc As NotesDocument Set uidoc = workspace.CurrentDocument Set doc = uidoc.Document Dim db As NotesDatabase Set db = doc.parentdatabase Dim stuff As Variant Dim memodoc As New NotesDocument(db) Dim stuffx As Variant stuffx="" memodoc.form = "memo" memodoc.sendto = "Rob Pinion/USA/BAC" memodoc.subject = "Result" Set rtitem = New NotesRichTextItem( memodoc, "Body" ) Forall item In doc.items If item.issummary Then Forall v In item.values stuffx = stuffx & " " & v End Forall Call rtitem.AddNewLine( 1 ) Call rtitem.AppendText( item.name & " == " & stuffx ) stuffx = "" End If End Forall Call memodoc.send(False) End Sub