Notes COM - Trying to add rich text to email body

Hello,I am currently writing two different programs (one in vba and one in vb.net) that both need to send emails through notes. So I need to be able to take rich text from either a word document or a rich textbox and put it in the body of the email I am sending in notes. The problem I am having is that when I use the NotesRichTextItem I can not seem to find a way to set it too a block of rich text. I was able to appendText to it but it loses the formatting. The only other solution I have found is to send it as HTML but then the problem of converting RTF to HTML arises. If anyone knows a way to do this it would be greatly appreciated. If you need any clarification let me know.

Subject: Notes COM - Trying to add rich text to email body

Notes Rich Text and Microsoft Rich Text are not related in any way (well, except that the text is formatted). In a UI paste, the conversion happens as automatically as it can, but using the back end, you have to parse the formatted text in one environment, then use the formatting elements in the other environment to try to reproduce what you just read. In other words, if the Microsoft rich text starts with bold red 24-point text, then you have to look for a format change, get the range corresponding to the format block, excerpt the text, create a Notes Rich Text style that roughly corresponds, append that style, then append the text, then repeat the whole process for the next formatted “chunk” of text. (And you though converting HTML was nasty.)

Subject: RE: Notes COM - Trying to add rich text to email body

using the back end, you have to parse the formatted text in>one environment, then use the formatting elements in the

other environment to try to reproduce what you just read.

Stan, how do you parse Notes RTF in LotuScript to get it into an MS Word document?

Or, how do you convert it to one of these MIME format things and how would you get that into MS Word?

Or, how would you get Notes RTF into MS Word via LotusScript?

Thanks if you can help.

-Jeff

Subject: RE: Notes COM - Trying to add rich text to email body

The question asked about going the other way. If you want something that will convert Notes RTF to Microsoft RTF, see:

http://www.nsftools.com/tips/NotesTips.htm#rtfexport

Subject: RE: Notes COM - Trying to add rich text to email body

Ah thank you Stan, that definetly clears things up a bit. So I’m thinking that parsing it into HTML is likely the easier route. Now, from vb.net I can send an HTML and flag the email as HTML and notes displays it fine. My next question is, can you add HTML to the body through the back end and have it show properly (this would be for my vba app).

Subject: RE: Notes COM - Trying to add rich text to email body

In ND6.5, you should have access to the full gamut of NotesMIME classes (I don’t have it installed locally here, so I can’t check). Just create your HTML document as a MIME entity and put that in the Body – both the Notes client and any external e-mail program should be able to handle it without problem then.