.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: RemoveRow method
1. This agent gets the first or only table in the Body field of the current document and removes the last row.
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
Messagebox "Row count = " & rtt.RowCount,, _
"NotesRichTextTable"
REM Call rtt.RemoveRow
Call rtt.RemoveRow(1, 1)
Call doc.Save(True, True)
Messagebox "Row count = " & rtt.RowCount,, _
"NotesRichTextTable"
End Sub
2. This agent gets the first or only table in the Body field of the current document and removes the last two rows.
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
Messagebox "Row count = " & rtt.RowCount,, _
"NotesRichTextTable"
Call rtt.RemoveRow(2, rtt.RowCount - 1)
Call doc.Save(True, True)
Messagebox "Row count = " & rtt.RowCount,, _
"NotesRichTextTable"
End Sub
See Also
RemoveRow method
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents