rtLib — Notes Rich Text Management Library Documentation of rtLib — Notes Rich Text Management Library Download rtLib — Notes Rich Text Management Library FAQ of rtLib — Notes Rich Text Management Library Purchase rtLib — Notes Rich Text Management Library Feedback about rtLib — Notes Rich Text Management Library

Cookbook

Anchors

Start search Mail feedback Back to Description


rTextRange rtAnchor rtNoteLink rtHRule

add (rtContainer) appendText (rtContainer) appendText (rtObject) appendText (rTextParagraph) Add (rtCollection) Add (rtObject) Add (rTextParagraph) Collapse Find getRichTextItem Insert (rTextRange) NotesColor (rtFontstyle) NotesColor (rtHRule) replace (rtCollection) replaceItemValue Replace (rtContainer) RuleHeight RuleWidth setSource

Code fragment from sample "Anchors"; see full running samples in downloadable help.
Set ctx = New rtContainer
Call ctx.getRichTextItem(doc,"Body")
Dim range As rTextRange,start As rtObject, anchor As rtAnchor, link As rtNoteLink
Dim hrule as new rtHRule (0)

Set range = ctx.Find("Caesar", 0)
If Not range Is Nothing Then
Set anchor = New rtAnchor("Caesar")
Print "SET ANCHOR"
range.Collapse(nxCollapseStart).Insert anchor
End If
Set link = New rtNoteLink(doc)' point to this document - may use DB or view instead
'link.setSource doc' may also set source separately; source can be also database or view
link.Anchor = "Caesar"
link.Comment = "Going after Caesar" ' put any comment - without it the Anchor link won't work
ctxDump.add hrule
With hrule
.NotesColor = COLOR_RED
.RuleWidth = 10*ONE_CM
.RuleHeight = 0.2 * ONE_CM
End with

ctx.replaceItemValue doc, "Body" ' replace in this document
doc.save True, True
' this will be in the new document
ctxDump.appendText "This will take you to Ceasar: "
ctxDump.Add link