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.
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
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
-
People who read this also read...
This was first published in December 2003