Attachments- note item not found

I have a database form where users can attach various types of files… .xls, .doc, .tif. After the document is saved when the next person opens it and tries to launch the attachment, it says ‘notes item not found’. I used to tell them to make sure when attaching a document to uncheck the compress box. Any insight on this? Also I’ve found that if I allow them in edit mode to create a new document inheriting many fields from the previous document… that the same problem happens with attachments. The ability to copy one document into another is a great tool but if the attachments won’t copy then the beauty fo coping a document is lost. Any ideas?

Subject: attachments- note item not found

I have the same problem with a database where perodically attachments are replaced. I have a script, where i call “object.remove” to the old object and “set object” to create a new object. With R5 Client this agent works fine. With R6 after replacing I have 2 attachments with the same name. If I open the first attachment I get the message “note item not found”. If I open the second attachmant, it works fine. The statement “Isempty(RTitem.EmbeddedObjects)” gives True. I think this a bug with Rich text item handling.

Here the Code-Example

If Not(Isempty(RTitem.EmbeddedObjects)) Then

Forall o In rtitem.EmbeddedObjects

If ( o.Type = EMBED_ATTACHMENT ) Then

FileName = biPathName & o.Source

If ( o.Source = Dir$(FileName, 0)) Then

Call o.Remove

Set object = rtitemNew.EmbedObject EMBED_ATTACHMENT, "", FileName )

Call doc.Save( False, True )

End If

End If

End Forall

End If

Matthias Leonhardt