Sending a document to multiple recipients using Lotusscript
Posted on 2004-10-26
I'm using Lotusscript to send an email with a doclink to multiple recipients. The list of recipients is a concatenation of several fields....this does not seem to work, though. My code works fine for a single recipient - I'm just not sure how to format the list of multiple recipients. I've tried using different delimiters and using an array, but can't anything to work.
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Call rtitem.AppendDocLink( uidoc.Document, db.Title)
newDoc.Subject = "My subject"
newDoc.SendTo = uiDoc.FieldGetText("Recipient1") & ", " & uiDoc.FieldGetText("Recipient2") & ", " & uiDoc.FieldGetText("Recipient3")
newDoc.Send( False )