Get Information out of Richtext Field via LotusScript

Hi !

I´ve a button in the email document to put in the signature out of the calendarprofle document.
It works, but I only get the text without the formatting (color, font …).
I had to take the field as a RichtextField , but I don´t know, how to do it, because my ls knowledge is not so good.

Here´s the code, maybe somebody has an idea !

Thanks.

Sub Click(Source As Button)

Dim s As New notessession
Dim profiledoc As NotesDocument
Dim db As notesdatabase
Dim signature As String
Dim uidoc As NotesUIDocument
Dim workspace As New NotesUIWorkspace

’ Get signature from profiledocument
Set db = s.currentdatabase
Set profileDoc = db.GetProfileDocument(“CalendarProfile”)
signature = profileDoc.Signature_1

’ Put into email
Set uidoc = workspace.CurrentDocument
Call uidoc.GotoField( “Body” )
Call uidoc.FieldAppendText ( “Body”, signature )

End Sub

Subject: Some things to look at

uidoc.appendtext is plain text only (uidoc being the front end ui doc). Get a handle to the backend doc (uidoc.document), and use the the RichText… classes to add style

NotesRichTextItem
NotesRichTextStyle

Subject: thanks for information … got it :slight_smile: