Forwarding multiple mails with Lotuscript?

Does anyone know how to forward multiple mails in one mail using Lotuscript? When a user selects multiple mails and click “Forward”, I need to check the selected documents. If one of the documents contains a flag, prompt user an error message. I believe there is no way to check for the flag with @Formula. Therefore, I need to use Lotuscript. However, the MakeResponse() can only accept one document as argument.

Subject: Example…maybe this will help!

%REM This agent forwards selected mail to another e-mail account.

  Modify the If statement to reflect what to search for.

  Any field on the origingal can be used in the search.

  Change the fwd.SendTo line to the correct userid.

 Multiple If, Then, Else statements can direct to multiple addresses.

%END REM

Sub Initialize

 Dim session As New NotesSession

 Dim s As New NotesSession

 Dim db As NotesDatabase

 Dim fdb As NotesDatabase

 Dim collection As NotesDocumentCollection

 Dim fwd As NotesDocument

 Dim Body As NotesRichTextItem

 Set db = session.CurrentDatabase

 Set fdb = s.CurrentDatabase

 Set collection = db.UnprocessedDocuments

 For i=1 To collection.Count

      Set doc=collection.GetNthDocument(i)

      If Instr(1,doc.From(0),"netmail",1) Or

Instr(1,doc.From(0),“somename”,1) > 0 Then

           Set  fwd = New NotesDocument(fdb)

           fwd.Form = "Memo"

           fwd.SendTo = "someone@somewhere.com"

           fwd.ReplyTo = doc.From

           fwd.CopyTo=" "

           fwd.BlindCopyTo= " "

           fwd.Subject = (doc.From(0) & ": " & doc.Subject(0))

           fwd.Body = doc.Body

           Call fwd.Send False)               

      Else

           'do nothing

      End If

 Next

End Sub

Subject: RE: Example…maybe this will help!

How do you get attachments sent?

Subject: RE: Example…maybe this will help!

Michael,

Thank you for the code. But, this is not what I am trying to do. The code is to forward message for each selected documents, one at a time. I need the Lotuscript to do what exactly happen when a user selects multiple mails in Inbox and clicks “Forward”. It will open an response document in edit mode with all the messages inserted into the content.

Thanks