Passthruhtml and notesrichtextstyle

hello! I have an agent for notes client like that:Sub Initialize

Dim s As New NotesSession

Dim lodb As NotesDatabase

Dim loWs As New NotesUIWorkspace

Dim loReporte As NotesDocument

Dim rtS As NotesRichTextStyle



Set loDb = loWs.CurrentDatabase.Database

Set loReporte=loDb.CreateDocument()		



Set rtS = s.CreateRichTextStyle

rtS.PassThruHTML = True

Dim rt As New NotesRichTextItem(loReporte,"datagrid")



loReporte.FORM="prueba"



Call rt.AppendText("Detalles:")			

Call rt.AddNewline(1,True)

Call rt.AppendStyle(rtS) 

Call rt.AppendText("<B>Prueba de html</B>")

loReporte.Save True,False

Call loWs.EditDocument(False,loReporte)

End Sub

and I have a Prueba form with a datagrid RT field.

This agent show a document like that:


Detalles:

Prueba de html


without passthru html!!!

Any body help me please!

Thank you in advance

Guillermo Villanueva

Subject: passthruhtml and notesrichtextstyle

I am sorry to tell you, but the text you add to the RT-item is passtrhu. You might check this by switching the document to edit-mode.

Subject: RE: passthruhtml and notesrichtextstyle

You are right!In edit mode, my text is in passthru, So why not display them properly in read only mode?

Subject: RE: passthruhtml and notesrichtextstyle

why shows HTML code instead of displaying text in bold?

Subject: RE: passthruhtml and notesrichtextstyle

I think there is some issue with rendering HTML in the client in a rich text field and not on the form.

Subject: RE: passthruhtml and notesrichtextstyle

Thank you Ben,What kind of issue do you mean? Is a Lotus bug or problem in my form definition?

Subject: RE: passthruhtml and notesrichtextstyle

Following Stan Rogers, I found this code. It is from http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/a2bb7f988f61ca6c852574c90056cce0?OpenDocument and it does work!

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim body As NotesMIMEEntity

Dim header As NotesMIMEHeader

Dim stream As NotesStream

Set db = s.CurrentDatabase

Set stream = s.CreateStream

s.ConvertMIME = False ’ Do not convert MIME to rich text

Set doc = db.CreateDocument

Call doc.ReplaceItemValue(“Form”, “Memo”)

Set body = doc.CreateMIMEEntity

Set header = body.CreateHeader(“Subject”)

Call header.SetHeaderVal(“MIME message”)

Set header = body.CreateHeader(“To”)

Call header.SetHeaderVal(“john.doe@mydomain.com.br”) 'mail to recipient here

Call stream.WriteText({Click here for CNN})

Call body.SetContentFromText _

(stream, “text/plain;charset=UTF-8”, 1726)

Call doc.Send(False)

s.ConvertMIME = True ’ Restore conversion

End Sub