cancel
Showing results for 
Search instead for 
Did you mean: 

Save Multiple Attachments Having Same Name

PawanPanjwani
Level 3

Hi Community Members,

I have 2 attachments with the exact same name in a single email. I want to save both of these attachments in C\Temp folder, obviously with different names as we can’t save 2 files with the same name in same folder.

I am using Object created by my company but its base is MS Outlook VBO. Below are the steps that I am following:
1) Using Read Emails to get relevant email.
2) Using Get Message Details to get all the attachments in the particular email.
3) Using Attachment collection as loop

  1. In the first iteration of Attachment loop, it will save the file.
  2. In second iteration, it will check if file is already saved with the same name.
  3. If yes, then change file name with suffix 2 at the end. (For e.g. File name is Test.xlsx. Then first file will be saved as Test.xlsx and second file will be saved as Test2.xlsx).
  4. Now the problem in this case is that while saving the 2nd File, since both files names are same, Blueprism is again saving first file only, this time naming it as Test2.xlsx. So 2nd file is not saved at all.

Please advise on know how we can tackle this problem in Blueprism.

Thanks & Regards,

Pawan Panjwani

2 REPLIES 2

expertcr
Staff
Staff

I try to look for that VBO, but I don't find that one. Can you please provide the link where do you get that one?

Do you try using MS Outlook VBO (LINK)? or Function for Microsoft 365 - Outlook - 1.3.1 (LINK)?

PawanPanjwani
Level 3

Hi Luis, 

The Email object is inbuilt by my company but the base is taken as MS Outlook VBO only. 

Thanks & Regards,
Pawan Panjwani