Hi all,
I’ve used the sample codes in designer to read the table cell value. Anyhow it only retrieve first text paragraph in each cell. I’ve tried to modify the codes but stiill unable to get the cell value if there is a new line. Would appreciate for help if can read all text in each cell.
- my column value shown as below (Text1 + chr13 + Text2)
Text1
Text2
SAMPLE CODES
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim dc As NotesDocumentCollection
Set dc = db.UnprocessedDocuments
Dim doc As NotesDocument
Set doc = dc.GetFirstDocument
Dim rti As NotesRichTextItem
Set rti = doc.GetFirstItem(“Body”)
Dim rtnav As NotesRichTextNavigator
Set rtnav = rti.CreateNavigator
If Not rtnav.FindFirstElement(RTELEM_TYPE_TABLE) Then
Messagebox "Body item does not contain a table,",, _
"Error"
Exit Sub
End If
Dim rtt As NotesRichTextTable
Set rtt = rtnav.GetElement
Dim rtrange As NotesRichTextRange
Set rtrange = rti.CreateRange
Call rtnav.FindFirstElement(RTELEM_TYPE_TABLECELL)
firstFlag = True
For i& = 1 To rtt.RowCount
For j& = 1 To rtt.ColumnCount
If Not firstFlag Then
Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
Else
firstFlag = False
End If
Call rtrange.SetBegin(rtnav)
Messagebox rtrange.TextParagraph,, _
"Row " & i& & _
", Column " & j&
Next
Next
End Sub
many thanks ahead.