views:

539

answers:

2

Here is my problem,

I am doing a data migration from Lotus notes to another type of software that does not support Rich Text Fields. I am trying to write a VB 2005 program that will take any rich text fields that are found and place them into an RTF file - which will be uploaded as an attachment in the new software.

I cannot get the program to take the rich text formating or objects to the RTF file, only the plain text. I have tried everything under the sun using the COM library to get these objects out to no avail.

Any ideas or suggestions?

Thank you in advance Bryan

A: 

The Notes rich-text structure is proprietary and you will not be able to directly export a Notes rich-text item into a Windows rich-text formatted file. It is possible to have Notes store rich text fields in HTML/MIME format (rather than the proprietary format), which you could then export to a file and attach as a .htm file as an attachment in your new software (if that would meet your requirements). If you are interested, there are some details in answers to this Stack Overflow question:

http://stackoverflow.com/questions/1880511/how-to-export-rich-text-fields-as-html-from-notes-with-lotusscript/1895077#1895077

Ed Schembor
A: 

There is an undocumented C api call "ExportRTF". Julian Robichaux has an example of using it in a database here:

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

"Here's a database I wrote with some code that allows you to export the information in a Notes rich text field to an RTF file, while retaining most or all of the rich text field formatting. It also demonstrates how to write multiple things to a single RTF file (including multiple rich text fields), if that's something you're interested in doing. Additionally, the techniques involved should allow you to export rich text fields that are greater than 64k in size "

kerrr