开发者

Lotus Notes rich text field to RTF File - VB

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


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 "


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:

How to export Rich Text fields as HTML from Notes with LotusScript?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜