Problem solve Get help with specific problems with your technologies, process and projects.

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.
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.

Dig Deeper on LotusScript

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...