0
votes

I am working on a Data extract from a Lotus Notes Application. It stores legal documents which may have attachments and images (not mails). I want to convert notes documents to HTML. While importing the data using java API I am able to extract Text, Attachments etc but when it comes to images I am not able to extract them. I did some research and found about two approaches

1) To extract the document using generateXML() method. But the generated document contains a picture tag which has a referenece of location on Notes Domino server. But I want the image so that it can be included in the HTML document.

2) By extractinh as MIME Entity. When I try to get images using getMIMEEntity("Body") or any other field I do not get any image and It always return null.

There is question (Extract inline images from Lotus Notes using Lotus Notes Java API) which deals with this but It does not answers conclusively and its dormant for a long time.

Please help, I am working on it for a couple of days still I cannot import images. Thanks in advance.

1
Some clarification, you question title says "Cannot Export Image..." while your content talks about "importing images". What exactly is required here?Naveen
it means Exporting from notes and importing as HTML. Let me edit it to make it more clear. :)Shahid Ali
I had written a blog about Import image resources via LotusScript & Java. Probably you could get some ideas from there.Naveen
Hi Naveen, I see that your blog post is about importing image from outside to lotus notes. but what i want is to extract the images in notes documents into html or some other a image files.Shahid Ali
The first thing you need to do is figure out whether the images in your documents are stored within Notes Rich Text items, or within MIME (RFC822 TEXT) items. You need to examine the form and identify the name of the fields that contains the attachments (you used "Body" up above, but I don't want to assume that's really the name, or that it's the only field that contains attachments), and then look at the document properties dialog and find the corresponding field names and check their data types.Richard Schwartz

1 Answers

-1
votes

In Lotusscript you can first Extract file to your local system/ Server and than export in excel by using that code below.

' Loop through all attachment/document (By creating attachment object)and save Image to some path on server/local 'system(strSaveasPath) Call object.ExtractFile( strSaveAsPath) ' Now Activate excel row:column range where you wnat to insert image xlApp.Range("1:1").Activate xlApp.ActiveSheet.Pictures.Insert(strSaveAsPath)