@Attachments not right... copy of attachment

Hello,

I’m using 2 documents ( docA and docB ) accesed by web.

2 forms have a “File upload control”.

I load a file in my docA and I want to copy the attachment in my docB

To do that, I use :

Dim SourceItem As Variant

dim DocA As NotesDocument

dim DocB As NotesDocument

Set SourceItem = DocA.GetFirstItem(“$FILE”)

Dim NewItem As New NotesItem (DocB, “$FILE”, SourceItem)

At the end of my script I do :

Call DocB.ComputeWithForm(True,False)

Call DocB.Save( True,True)

When I open DocB, I can read the attachment but the formula @Attachments

return 0 … Why???

How to update this value? , my computewithform doesn"t work?

Many thanks !!

Traz

Subject: @Attachments not right… copy of attachment

dim objA as notesEmbeddedObject, objB as notesEmbeddedObjectdim DocA As NotesDocument, DocB As NotesDocument

dim bodyB as NotesRichTextItem

set objA=DocA.GetAttachment(“MyFile”)

if not DocB.HasItem(“Body”) then

set bodyB =new NotesRichTextItem("Body",DocB)

else

set bodyB =DocB.GetFirstItem("Body")

objA.Extract("c:\temp"+objA.Name)

set objB=bodyB.EmbedObject( EMBED_ATTACHMENT, “”, ""c:\temp"+objA.Name)

call bodyB.Save(true,true)