It does not appear you are using the Notes Domino object model for
passing your email. Using the Domino Library you can use this code in
an Access module. The Domino object model will read an array
internally, you don't have to do any looping, just pass the array
Sub SendNotesMail(p_SendTo() As String, p_Subject As String, p_Body As
String, p_Path() As String, p_NotesPassword As String)
Dim n_Session As New NotesSession
Dim n_dir As NotesDbDirectory
Dim n_db As NotesDatabase
Dim n_doc As NotesDocument
Dim n_object As NotesEmbeddedObject
Dim n_rtitem As NotesRichTextItem
Dim i As Integer
Call n_Session.Initialize(p_NotesPassword)
Set n_dir = n_Session.GetDbDirectory("")
Set n_db = n_dir.OpenMailDatabase
Set n_doc = n_db.CreateDocument
Call n_doc.AppendItemValue("Form", "Memo")
Call n_doc.AppendItemValue("SendTo", p_SendTo())
Call n_doc.AppendItemValue("Subject", p_Subject)
Set n_rtitem = n_doc.CreateRichTextItem("Body")
n_rtitem.AppendText (p_Body & vbCrLf & vbCrLf)
For i = 0 To UBound(p_Path)
Set n_object = n_rtitem.EmbedObject(EMBED_ATTACHMENT, "", p_Path(i))
Next i
n_doc.SaveMessageOnSend = True
Call n_doc.Send(False)
Set n_db = Nothing
Set n_Session = Nothing
MsgBox "Email has been sent"
End Sub
the array p_SendTo() can take any email name or group name. Just pass
it to the routine. This routine also does attachments.
Rich
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!