Hi,I have a huge number of jpeg files and I need to paste these images into a RTF in Lotus Notes documents.
The documents already exist and have a key field which is the jpeg’s file name.
Any ideas ?
Thank you.
Hi,I have a huge number of jpeg files and I need to paste these images into a RTF in Lotus Notes documents.
The documents already exist and have a key field which is the jpeg’s file name.
Any ideas ?
Thank you.
Subject: Importing jpeg files into RTF
There is sample code for Windows here, with an extra example here.
Subject: RE: Importing jpeg files into RTF
It works like a dream, you really saved my life.Thank you for sharing the code.
Gigi Tufish
Subject: RE: Importing jpeg files into RTF
Rod
Thanks for sharing this.
This works perfectly for me in R5 but when I run the same code in R6.0 the image is appended to the rtf rather than inserted at the point where your CreateImageItem routine is called.
Any ideas?
Subject: RE: Importing jpeg files into RTF
In fact I originally wrote the whole thing in Notes 6. I still have the button in my journal, so I pressed it again just now and it worked as before, but I don’t have 6.0.2 CF2 to try. CreateImageItem does append an item. The next GetFirstItem should include the new item, so anything else that is added goes after the image. Maybe you need to save the document again after adding the image, or maybe you need to Delete body to make GetFirstItem work properly.
Subject: RE: Importing jpeg files into RTF
Sorry to have bothered you Rod - with a little imagination I should have been able to work that out. Deleting the body object did the trick, it works perfectly now.
I have never had the need to use either of C or C++ up until now but I think it is time to take the plunge…
Subject: Importing jpeg files into RTF
You have a couple of choices. If it is OK to do this in the front end, you simply need to keep opening the documents in LotusScript and doing a NotesUIDocument.Import on each one. If you need to do this in the backend, you might need to either use a third party product, such as our Midas Rich Text LSX with its AppendGraphic method, or get involved with an API solution of your own.