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

Export images

Start search Mail feedback Back to Description


rtGraphic

add (rtContainer) addNewLine (rtContainer) addNewLine (rTextParagraph) appendText (rtContainer) appendText (rTextParagraph) Add (rtCollection) Add (rTextParagraph) Collection (rtContainer) Collection (rtEnumeration) exportToFile getRichTextItem hasMoreElements ImageType NextElement

Code fragment from sample "Export images"; see full running samples in downloadable help.
Dim path As String, o As rtGraphic
path = Environ("TEMP")
if path<>"" then path = path + "\"' it's a W32 client
Set ctx =New rtContainer
Call ctx.getRichTextItem(doc,"Body")
Set hotcoll = ctx.Collection(PARSE_GROUP_GRAPHIC)' get images - import/export supported at the moment only R5 style native JPEG/GIF
Set enum = New rtEnumeration(hotcoll)

Dim fname(2) As String, cnt As Integer
fname(0)="flagDE"
fname(1)="flagEN"
fname(2)="flagIT"

Do While enum.hasMoreElements
Set o = enum.nextElement
If o.ImageType =CDIMAGETYPE_JPEG Then
Set rtp = New rTextParagraph("JPEG image exported to " &path &"flagDE.jpg")
ctxDump.addnewline 1
ctxDump.add rtp
o.exportToFile path &"\" &"flagDE"' only one jpeg - its German flag
End If
If o.ImageType =CDIMAGETYPE_GIF Then
ctxDump.addnewline 1
ctxDump.appendText ("GIF image exported to " &path &fname(cnt) &".gif")
o.exportToFile path &"\" &fname(cnt)
cnt = cnt + 1
End If
Loop