Hello,
hope somebody know if is there way to import picture/photo from file system to notes document.
It doesnt matter if import to rich text field or only somehow view in form directly from external place.
I searched but did not find anything.
Thanks
Leoš
Hi Leoš
this works for me:
strFilePath = "C:\temp\BBZ11Q5132.jpg"
fileFormat = "image/jpeg"
session.Convertmime = True
Set stream = session.CreateStream
Call stream.Open(strFilePath)
Set body = doc.CreateMIMEEntity("DummyRichText")
Set header = body.CreateHeader("Content-Type")
Call header.SetHeaderVal("multipart/mixed")
Set child = body.CreateChildEntity()
Call child.Setcontentfrombytes(stream, fileFormat, 1730)
Call stream.Close()
Call doc.save(False, False)
Set rtitemA = New NotesRichTextItem(doc,"immagine")
Set rtitemB = doc.GetFirstItem("DummyRichText")
Call rtitemA.AppendRTItem( rtitemB )
Call rtitemB.Remove()
T
@Leoš Suchomel In Addition to above suggestions you can do it fom the user interaction as well using RichText Lite field as below
Design from Designer and output: