|
rTextRange
rtGraphic
rtHotLink
rtNoteLink
add (rtContainer)
Add (rtCollection)
Add (rTextParagraph)
Bold
Caption
CaptionPosition
Collapse
Find
Font
FontSize
getRichTextItem
Insert
NoteLink
PicWidth
Style
Typeface
Code fragment from sample "rTextRange.Insert"; see full running samples in downloadable help.
|
ctxDump.getRichTextItem doc, "Body"
dim typeface as string
if ses.platform = "Macintosh" then
 path = strLeft(ndb.FilePath,":") + ":" ' default place(?) where it stores things without path (exported to in export sample)
 typeface = "Aristocrat LET"
 Else
 path = Environ("TEMP")
 if path<>"" then path = path + "\" ' it's a W32 client
 typeface = "Brush Script"
End if
Dim r As rTextRange
Dim ins As New rtGraphic(path &"flagIT.gif")
ins.picWidth=ins.picWidth *3 ' scale the picture
ins.Caption = "This is the Italy caption"
Set ins.Style = New rtStyle(9)
Set ins.Style.Font = New rtFontStyle(0)
ins.Style.Font.Bold = True
ins.Style.Font.FontSize = 18
ins.Style.Font.Typeface = typeface
ins.CaptionPosition = CAPTION_POSITION_BELOW_CENTER ' CAPTION_POSITION_MIDDLE_CENTER
dim hotlink as new rtHotlink(8)
dim ws as new notesuiworkspace
Set hotlink.NoteLink = new rtNoteLink(ws.currentDocument.document)
set rtp = new rTextParagraph(ws.currentDocument.document.tTitle(0))
hotlink.add rtp
set r = ctxDump.Find("text",0).Collapse(nxCollapseEnd)
r.Insert ins
' r.Insert hotlink
|
|