Extract LN Email attachments

305 pts.
Tags:
Lotus Notes
Lotus Notes attachments
Hi, Im using the following code to Extract LN Email attachments. It is extracting correctly but only issue is, the agent is not saving the attachment if the attachment is of same name though it is in different email. Sub Initialize Dim s As New NotesSession Dim db As NotesDatabase Dim coll As NotesDocumentCollection Dim doc As NotesDocument Dim eo As NotesEmbeddedObject Dim RTITEM As NotesRichTextItem Set db=s.CurrentDatabase Set coll=db.UnprocessedDocuments For a=1 To coll.count Set doc=coll.GetNthDocument(a) Set rtitem = doc.GetFirstItem("Body") If Not IsEmpty(rtitem.embeddedObjects) Then If Dir$("c:Attachment Files",16) = "" Then MkDir "c:Attachment Files" folderpath ="c:Attachment Files" Else folderpath ="c:Attachment Files" End If ForAll o In rtitem.EmbeddedObjects oname=folderpath+""+o.name Call o.ExtractFile(oname) Print o.name MessageBox o.name Call rtitem.AddNewLine( 2 ) Call rtitem.AppendText(( "Your file was downloaded to " +folderpath+ " as filename: " ) & o.name) Call doc.Save( False, True ) End ForAll End If Next End Sub Can anyone help me?
ASKED: November 1, 2012  10:04 AM
UPDATED: November 1, 2012  12:38 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

It works like a charm, you just forgot to put the hierarchy symbol “\” between your drive letter and your folder name in the folderpath variable

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following