Problem with RTF in mail

Hi all,

i have the following problem:

On a form i have two text fields and one richtext field.

These three fields are merged to one Body field for an email (I cannot use one field, because the content in the richtext field is copied to another rtf in another document for history, the other fields are not relevant for history).

If the users writing text in the rtf and presses enter for a line break and send the email, the text is indented after the first line break, when the email is opened through Not-Notes clients or Webmailer. In the Notes Client it looks fine.

If i look in the html code in a Webmailer, i see that every indented line contains several “&.#160;” (w/o point after &) before the text starts.

Note:

If the user are pressing shift + enter for creating a line break, the text is not indented. I’m wondering about that, because if i create a ‘normal’ Memo in Notes with line breaks which created through enter-key and send it to the internet, the mail looks fine.

Here’s my code which creates the body field:

Dim memo As NotesDocument

Dim body As NotesRichTextItem

Dim memoBody As NotesRichTextItem

Dim rtnav As NotesRichTextNavigator

Set memo = New NotesDocument(db)

Set body = uidoc.Document.GetFirstItem(“RichTextField”)

Set memoBody = body.CopyItemToDocument( memo, “Body” )

Set rtNav = memoBody.CreateNavigator

rtnav.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)

Call memoBody.BeginInsert(rtnav, False)

Call memoBody.AppendText(uiDoc.Document.GetItemValue(“FirstTextField”)(0))

Call memoBody.AddNewline(1)

Call memoBody.EndInsert

Call memoBody.AddNewline(1)

Call memoBody.AppendText(uiDoc.Document.GetItemValue(“SecondTextField”)(0))

Hope someone can help me!

Thx in advance, Niki