Copy No from save Attachment and save file as No.xlsx

I used get outlook mail messages and read mail regarding subject contains one attachment which having policyno and I have to save that in folder named as Policy no

@Sushant_Chanakhekar Refer this thread

Fine while using the save attachment activity mention like this buddy
and if the text Policy No is stored in a string variable name in_policyno
Cheers @Sushant_Chanakhekar

hii @Palaniyappan
but how can i Extract That policyNo from attachment

@Sushant_Chanakhekar Use regular expression to get policy number from the attachment

@indra Can yoy plz send me regular expression

Fine to get the attachment name we can do like this buddy @Sushant_Chanak
–once after getting all the list of mail in get outlook mail activity and iterated through for each loop, inside this loop use a assign activity to get the attachment name like this
in_attachmentname = CType(item.Attachments.FirstOrDefault, Attachment).Name

Then we can get the policyno from the in_atttachmentname with string manipulation
can i have a sample of your attachment name so that we could tell you how to get the policy no from it
Cheers @Sushant_Chanakhekar

@Sushant_Chanakhekar Can you share screenshot or attachment that you are getting

1 Like

@Sushant_Chanakhekar In which format you are getting the attachment can you share that attachment file

aaha you mean you want to get the policy no which is there inside the attachment…
Fine sorry for the misunderstand of query
Alright…we can open the attachment by passing the filepath as input to START PROCESS activity…which will open the excel file
Then use a screen scrapping with ocr activities in the design menu or anchor base activity where keep the Policy No. /Cover text as anchor and use get ocr text activity to get the value of the policy no buddy
Hope this would help you
Cheers @Sushant_Chanakhekar


1 Like