cancel
Showing results for 
Search instead for 
Did you mean: 

Read email body from latest email received having HTML Table from Outlook Mail

Amruthasimplify
Level 5
Hello All,

I am having trouble in extracting email body containing HTML table using Outlook VBO.
The email received is a mail chain containing HTML Table and contents. I used Get Received Items (Basic) action in Outlook VBO and I get the entire email body with HTML contents.
Can anyone help me in extracting the body of the latest email only. Eg: if the email was first send on 3 days back and email conversation is being going on until today in the same thread. I just want to get the email body of the mail send today.
Also the HTML Table in the email body in a Collection. I believe a custom code is required.
Please suggest any alternate ways to retrieve it rather using regex or filter condition in the resulted whole email body from Get Received Items (Basic) action.

Thanks In advance,
Amrutha
3 REPLIES 3

So an alternative way that I had implemented before that doesn't require regex was to first copy over the HTML content that you have retrieved to clipboard. Then launch a temporary excel and paste the contents in it. Once pasted the HTML table should appear in cells/range and then you can attach-read the cells from the excel. You might have to use the Find function to find the start cell assuming the headers of your table have fixed names. You can then discard off the excel file.

Utility - Environment and MS Excel VBO should give yo all the actions you would need to implement this.

Soumya21
Level 6
Hi Amrutha,

You can use this object to get html table into collection. I have also found this one through Community

Thanks
Soumya

ParasPabari
Level 3
One way we have implemented is get email in normal mode (set HTML flag in VBO as No). This will give email in regular/old fashion. Once you get email read the first “From:” key word in body and take only those line into collection. That will give you latest email body. After that you can extract the table you need from that collection.