Extension comparison

I have the task of downloading the attachments from outlook. The downloaded file should only be a doc, Docx and pdf file other files should not be downloaded. I have got the extension of the received attachment using the syntax FileNameFromPath(0).Split(CChar(“.”))(1)
Now I don’t know how to compare this extensionnn with my criteria and save I can’t use any condition statement because it asks for a boolean type condition which I cant give.

Can anyone help meee…

If u have the extension then use if condition
FileNameFromPath(0).Split(CChar(“.”))(1).contains(“doc”) or FileNameFromPath(0).Split(CChar(“.”))(1).contains(“Docx”) or

Thanks for your reply
by using which activity i should give this condition

Thanks and regards

IF activity

1 Like

IF activity
in that in condition put the above condition
In then u need to put true part and else False part

1 Like

In save attachment filter property you can you…“(.pdf|.docx|.doc)” this filter to download attachments.



Refer this xaml file…DownloadAttachments.zip (11.1 KB)

1 Like

Hi @soumi_soumiya,
I think, you need not to compare extensions when you only need files of mentioned type. During using ‘Save Attachments’ activity use ‘Filter’ option. And write the below in ‘Filter’ box -

Thanks & Regards,

1 Like

Thank you it works

Thank you it works good

1 Like


Kindly close this topic with the right comment marked as solution that could help others looking for ideas under your topic …

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.