RichText Item

I have the following code in the queryopen and in the agent that handled the webqueryopen:

Sub Initialize

Dim sesion As New NotesSession

Dim doc2  As NotesDocument

Set doc2 =  sesion.DocumentContext

'Set sesion = NotesSession.CurrentSesion

Dim cdb As NotesDatabase

Set cdb = sesion.CurrentDatabase

Dim columnas As NotesView

Set columnas = cdb.GetView("cols")

Dim doc As NotesDocument

Set doc = columnas.GetFirstDocument

Dim rt As NotesRichTextItem

Set rt =  doc.GetFirstItem("Texto")



str1 =  rt.GetUnformattedText

str1 = Left$( str1,100)

Set rt = doc.GetFirstItem("Foto")

doc2.ReplaceItemValue "Foto1",rt

doc2.ReplaceItemValue "Texto1", str1

The problem is that i have a picture in the “Foto” field of the document in the view and i want to put it on the “Foto1” field, but this is not working…

any ideas?

Greeetings

Subject: Half way done

Ok… i change the code and i have this one now;

Dim cdb As NotesDatabase

Set cdb = sesion.CurrentDatabase

Dim columnas As NotesView

Set columnas = cdb.GetView("cols")

Dim doc As NotesDocument

Set doc = columnas.GetFirstDocument

Dim rt As NotesRichTextItem

Set rt =  doc.GetFirstItem("Texto")

Dim nav As  NotesRichTextNavigator

Dim rtFoto As NotesRichTextItem



str1 =  rt.GetUnformattedText

str1 = Left$( str1,500)

Set rt = doc.GetFirstItem("Foto")

Set rtfoto = doc2.GetFirstItem("Foto1")

rtfoto.AppendRTItem rt 

The “Foto1” field is updated ok when used on thw QueyOpen but not in thw WebQueryopen, that is i can see the picture on the notes client but got a “empty”
block.

Any Idea???

Greetings

Subject: Corrupted Image

I rewrite the blocks on the Notes Form and it seems to make this work for the web, that is if a enter is between a ] and a field it can bring some troubles…but know i got corrupted images to the Web…

The error:

Error 500

HTTP Web Server: Corrupt Data Exception

BTW if the image is a DB resource the image will be not corrupted.