Display image resource in body of email using LotusScript

All,I am trying to display an image resource in the body of an email I want to send using lotusscript. I thought I could use the EmbedObject method, but I have not had any luck. Any help would be appreciated.

Thanks.

Subject: Display image resource in body of email using LotusScript

Your have a few choices. The easiest approach, if you know what image resources you will need to do this with in advance, is to create a resource document with the image resource already added and then do an AppendRTItem from that. The only other “native” solution is to use DXL and create the appropriate image resource from that and import it in, but it will basically need to be a dump of the whole rich text field. If you are willing to go with a third party product, our Midas Rich Text LSX will let you do this with a call such as

Call rtchunk.AppendResource(“Image”, “MyImage.gif”)

or even include a formula, but it is a commercial product and does cost something.

Now, one last issue is the bit about this being an e-mail. If you are sending this to others who will have the same image resource in their design, that is great, but if not, the first two options will not work (even doing it manually won’t work), but Midas will do it if you change the code to:

Call rtchunk.AppendResource(“Image”, “MyImage.gif”, "MakeInline=‘Yes’ ")

which will simply take the image resource and make an in-line copy of it. I hope that helps.

Subject: RE: Display image resource in body of email using LotusScript

Thanks for all the info. One question, if the image is not an image resource, is there a way I could send it in the body of the email? I thought if it was an image resource, it would be easier to send.

Subject: RE: Display image resource in body of email using LotusScript

No – image resources are referenced rather than included as data (by default). Sort of the way an tag works on the web. If the image is already imported/pasted into a rich text field, then using AppendRTItem will include the picture data rather than just a pointer to the picture, so you no longer need the image to be available as a resource on the receiving end.