次のエージェントは、現在の文書の [本文] フィールド内で最初の (または唯一の) 表を取得し、RightToLeft プロパティを切り替えます。
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
REM Toggle reading order of table and save document
If rtt.RightToLeft Then
rtt.RightToLeft = False
Else
rtt.RightToLeft =True
End If
Call doc.Save(True, False)
End Sub