Copying a Rich Text field into Excel

I have some LotusScript that copies the contents of some fields from a Notes document into cells within an Excel spreadsheet.

This works well for plain text.

But is there a way where I can copy the contents of a Rich Text field - not just the text, but formatting too (eg, bolds, italics etc)?

Subject: I don’t know any magic easy way…

you can presumably use the OLE automation API of Excel to write formatted data into the cells, but this is done with a series of calls – I don’t know of one to just plop in some pre-formatted data. So you would have to scan the rich text runs using NotesRichTextItem and related classes to find out where the bold and italic and so forth are, and make a series of calls to do the formatting. Use the record macro function in Excel to see how that side of the code would look.

Subject: rich text runs

“So you would have to scan the rich text runs using NotesRichTextItem and related classes to find out where the bold and italic and so forth are…”

That sounds interesting. I googled rich text runs and came across an interesting Web site:

http://www.duffbert.com/duffbert/blog.nsf/d6plinks/TDUF-7K956P

Many thanks for your help.