Attachment empty in Rich Text item

Hi.This is my trouble: in a web application I have to substitute an attachment in a document to another taken from another document.

In a document I haven’t rich text field, all attachments are uploaded by web UpLoad Control.

In a WebQuerySave event I call an agent that removes the old attachment, and then I take the document containing new attachment and I detach file on disk, I create rich text field (named body) in the first document, I attach detached file in the new body field and finally I save the document.

Now…the problem is that when I view the document from Notes Client, in rich text Body I see the attach icon and the correct file name but if I click on a name Notes returns me an error, telling me there isn’t files to open…pratically I have file name but I haven’t fisically the file attached in my document.

And by web browser I can’t open attachment because Domino creates an URL string without file name after “$FILE”.

It happens only on R6 servers in cluster mode; I tryed on R5 server and on R6 servers not in cluster mode and it works full!

This is the code:

Doc is the document where I have to substitute attachment, docAtt is the document containing the new attachment.

Set vAtt=db.GetView(“vw902”)

Set docAtt=vAtt.GetDocumentByKey(,True)

If Not docAtt Is Nothing Then

Set AttR=docAtt.GetAttachment( )

If Not AttR Is Nothing Then

 Set Att= doc.GetAttachment( <FILE NAME>) 

 If Not Att Is Nothing Then

   Call Att.remove

   Call doc.save(True,True) 

   Set vistaR=db.GetVIew("vw8RR") 

   Call vistaR.refresh

   Set doc=vistaR.getdocumentbykey(<SEARCH KEY>)

   Call AttR.ExtractFile(<PATH+FILE NAME>)

   Set item = New NotesRichTextItem( doc, "body" )

   Set EmbOb = item.EmbedObject( EMBED_ATTACHMENT, "", <PATH+FILE NAME>)

   doc.textAttachName=docAtt.File1(0) 

   Kill <PATH+FILE NAME>

 End If

End If

Call docAtt.remove(True)

End If

Any ideas??

Thanks a lot