Problem While reading/retrieving outlook attachement

excel
outlook

#1

Hello,

I’m developing a process that is able to recover the attachment and the name and path, in order to open the file a bit later.
The mail is successfully recovered, the attachment (.xlsx) is saved (I also get the complete name and path from the activity).
A bit later, i want to open that file, but excel throw an error: "Unable to open file “errors2.xlsx” because its format or extension is invalid. Make sure that the file is not damaged and that its extension matches the file format."
I try to checked the file and surprise it’s 0ko

Of course the same process do by hand works perfectly.
Is anyone have already encounter that issue i’m literally out of idea to resolve that.

Thank you for your Help/Time

Peter


#2

Hi @Peter,

I encountered the same issue. The problem was that the email object I was using had lose its “context” (I was moving the mail in a folder before saving the attachment). When you are using Save Attachment activity, make sure it is in the same “context” that the activity getting the mail.

Hope that helps.

Regards.

Masiré


#3

Thank you @Masire,

So yes i just moved the save attachment activity next to the opening file activity and it works.
So that’s imply that we need to be careful about what we do and in which container it is ( to me it’s a new layer of complexity).

Thanks again.

Peter