Add more than one attachment in automated agent

I have the following notes agent which allows me to add an attachment to an e-mail.  I want to know wht I have to do to add multiple attachments.

Sub Initialize
     Dim ss As New notessession
     Dim db As notesdatabase
     Dim doc As notesdocument
     Dim rtitem As notesrichtextitem
     Dim object As NotesEmbeddedObject
     Set db = ss.currentdatabase
     Set doc = db.CreateDocument
     doc.SendTo = "core"
     doc.Subject = "Core Report"
     doc.Form = "Memo"
     Set rtitem = New notesRichTextItem (doc,"Body")
     Call rtitem.AppendText( "This report contains xxxxxx"  )
     Set object = rtitem.EmbedObject ( EMBED_ATTACHMENT, "", "C:\autoexec.bat", "Additional Message" )
     Call doc.Send(False)
End Sub

Who is Participating?
jschwarzConnect With a Mentor Commented:
Copy the line "Set object = ...".  In the new line, list the second file you want to add.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.