Manage Learn to apply best practices and optimize your operations.

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

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close