305 pts.
 Extract LN Email 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?

Software/Hardware used:
ASKED: November 1, 2012  10:04 AM
UPDATED: November 1, 2012  12:38 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. Michael Tidmarsh   11,380 pts. , swetha1   305 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _