I need to navigate a table of richtext field, and, on row(i) and col(2), check value of that cell in order to trigger a certain action. How do I do that? I check out the example of AppendTable for NotesRichTextItem on Domino Designer Help but still confuse on how to reference a specific cell value.
Subject: Reference a cell (row(i), colum(2)) in a table in a richtext field
There is no real way to do that in native LotusScript – the LS classes see table cells as a “flat” collection. You need to keep track of how many tables you have, how many cells are in each row of each table, and count your way into the cell that you are looking for. And if you have nested tables, you’re just plain out of luck.
There are a couple of ways around the problem. One is to use DXL, where you can export the document to a NotesDOMParser and find the cell in much the same way as you would on an HTML document. It works well, but it’s not particularly fast and the code to do it is fairly big (not huge, just longer than it ought to be to do something as seemingly simple as what you’re asking). The other is to use a third-party solution.
Pardon the pimping, but Genii Software (Ben Langhinrich’s company) has a couple of tools that can help. The Midas Rich Text LSX can address rich text table cells just the way you described in a LotusScript routine. Yes, it costs money, but it can save you money in the long run, especially if your company is “hiding” a lot of its valuable data in rich text.