Notes doesn't format newline characters when email is generated using Domino objects and VB

I am using Lotus Domino Objects in VB 6 to create and send an email. I create the Body of a message with CRLF characters. The problem is, the characters aren’t being recognized by Notes when I view the email. However, they are present in the Body! I can copy the text and paste it to Notepad, and the formatting is correct. Notes just strings all the text together on one line.

Here’s a portion of my code:

Dim sPreparedBody As String

sPreparedBody = "This is a test email message."

sPreparedBody = sPreparedBody & Chr(13) & Chr(10) & Chr(13) + Chr(10) & "This is line 2."

sPreparedBody = sPreparedBody & vbCrLf & vbCrLf & "This is line 3."



Call LotusNotesDoc.ReplaceItemValue("Body", sPreparedBody)

Here’s what the text looks like when I view the email in Notes:

This is a test email message.This is line 2.This is line 3.

It should look like this(it does in Notepad when copied from Notes):

This is a test email message.

This is line 2.

This is line 3.

Any help would be appreciated.

Subject: Notes doesn’t format newline characters when email is generated using Domino objects and VB

Check the properties of the body field in the document (not the form, mind you, but the document). Does it say rich text? Text list? Text? Mime part? Rather than the method you’re using, I’d recommend building the body as a NotesRichTextItem, using AddNewLine to put in line breaks rather than futzing around with ASCII.