Saving of Attachment Problem

Hi AllI am admin, when im attaching files in web. It saves all files but when some one else trying to attach more than one files then only last file which he attaching is saved & rest of all not saved. The agent which im writing is as follows :

Sub Initialize

Dim sess As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim rtitem As NotesRichTextItem 

Dim object As NotesEmbeddedObject



Set db = sess.CurrentDatabase

Set doc = sess.DocumentContext

Set rtitem = New NotesRichTextItem( doc, "rich" )

Forall i In doc.attach

	Set object = rtitem.EmbedObject(EMBED_ATTACHMENT, "", i, "attach" )

End Forall

End Sub

Sanjay Prasad

Subject: Saving of Attachment Problem

Dear Sanjay,

Ur code works fine , u have to dump all the attachment one by one into another field , so that it could be avialable while document will refresh

RIshi

Subject: RE: Saving of Attachment Problem

Dear Rishi & All,I am doing so one by one in to another field, but in my machine it is working fine cos im admin, in other machine it saves only last attachment.

Sanjay Prasad