I receive multiple mails, where I have to do a pattern search and get the results to an array. is there any easy way of doing it in excel vba?
My mail content looks like this :
Selection : Your Selection
Description : My description
Items :
ITEM.12345.XYZ
ITEM.56789.KHI
ITEM.54567.YHT
This is a sample mail.
............................
I need to grep for all the lines starting with ITEM. I can do it, by this way :
aryLines = Split(MyMail.Body, vbCrLf)
Loop through aryLines
Find the match
I am looking for an easy solution, as the number of matching lines varies and sometimes it can go over 1000 and sometimes less than 10. I want to populate these values to an xls sheet.