How can I update an uploaded file on the Web?

How can I update an uploaded file on the Web?

Hello, Maureen. I want to know how to update an uploaded file (on the Web not in Notes). I try it by using the following code in my agent:
Dim o as variant
Dim curdoc as notesdocument
set curdoc = (notessession).documentcontext 

Set o = curdoc.EmbeddedObjects(0)
This does not work. I can only attach it on a field thanks to @command([filesave]). Please help me.

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

The EmbeddedObjects property on the NotesDocument class is read-only, which excludes updating it. However, there are some enhancements in Rich Text processing in LotusScript in Domino 6 that make this much easier. First, bind a NotesRichTextItem object to the Rich Text field in the document that contains the attachment. You can then use the NotesRichTextNavigator method of the NotesRichTextItem class with RTELEM_TYPE_FILEATTACHMENT. You will then get an object that is a NotesEmbeddedObject class that has such methods as Remove and ExtractFile. Positioned within the Rich Text item, you can also add a new attachment with the EmbedObject method on the NotesRichTextItem class, thereby accomplishing the update.

This was first published in December 2003