Unable to retrieve .Eml file attachments

Hi there

I’m trying to extract attachments from .Eml file from start process activity it’s throwing error can any one assist me on this

Thanks

@Mohammed_mujeeb can you share screenshot of that where you are getting error.

Hi Manjuts thanks for your re

1.In start activity im using .vbscript File path :Dim OlApp
Dim Eml
Dim Arg
Set Arg = WScript.Arguments
Dim File

File = Arg(0)

Set OlApp = CreateObject(“Outlook.Application”)
Set Eml = OlApp.CreateItemFromTemplate(File)
Download(Eml)

Sub Download(objEml)
For Each Attch In objEml.Attachments
Attch.SaveAsFile "C:\Temp" & Attch.FileName
Next
End Sub

  1. Arguments putting as PDF Path.

Getting below error

image

Arguments putting as eml Path.

@Mohammed_mujeeb For downloading email attachments u directly use save attachments activity na.

Actually have .eml file in my local folder because im not trying to take from email
im trying to fetch from local machine folder and extract the attachment i have a application that handle correspondence im downloading .eml from application not from Email account once i download i have to open the .eml and extract the attachments from it any commens ?.

@Mohammed_mujeeb if u have permission read the access the file, close the pdf or any other file and run the program, once again.

I do have permission and the file is not open, when i try manually open the file opens perfectly not from the program.

@Mohammed_mujeeb i am not getting whats exactly your error? Wait for someone help or try on your own.

Hi Mohammed,

I am also facing same issue did you get any solutions for above issue.

Thanks
Udaya Kumar

Hi uday

I have resolved the issue using custom activity you can find in Uipath go activity name READ EML OBJECT

1 Like