Hi,
here in the document richtext field i have inline images, tables and text, my task is export the richttext cotent to html file, here i am fine with exporting tables and text by using notes mime entity class, but coming to inline images it not exporting , how we can show it as it is in html file.
here is the code i am using
SourceFieldName$ = “rtText”
Dim item As NotesItem
Set item = doc.GetFirstItem(SourceFieldName$)
'Set mime = bodyRTI.GetMIMEEntity()
Set mime = item.GetMimeEntity()
If Not (mime Is Nothing) Then
If (mime.ContentType = "multipart") Then
'** for multi-part MIME, which is anything with graphics,
'** you need to get the various parts one at a time.
'** If you write this to a file, it should be a .mht file so the
'** the browser knows what to do with it.
'** NOTE: there is a bug in R5 where you can't always
'** get the full contents of large sections of multi-part
'** MIME -- if you're dealing with large images, they will
'** often get cropped off at the bottom
isMultipart = True
PlainText$ =GetMultipartMime(mime)
Else
PlainText$ = mime.ContentAsText
End If
'If mime.ContentType = "image" Then
Set stream = session.CreateStream
pathname$ =cdir & "\" +Cstr("mig.gif")
Call mime.GetContentAsBytes(stream)
Call stream.Close()
' End If
End If
'PlainText = mime.ContentAsText
Close #1
Dim wDataDir As String
wDataDir = cdir & "\"
Open wDataDir + "bodycontent.htm" For Output As #1
Print #1, PlainText$
Close #1
i have functions in my code which i am not pasted here
please let me know how we can handle the inline images and how i can display the images in the generated html file.
i search the forum regarding the inline some of it telling that we have to go for notes dxl exporter which i dont use earlier.
please help any one did same earlier.
waiting for ur responses…