What is the best way to extract specific informations from outlook messages?

I want to read specific informations about the email sender.

I read my emails with a for each loop with assigned variables that contains the mail.sender, mail.subject etc.

And then im typing all that information into a .txt file so i filter it and put the necessery in a datatable that i build.
Later on when my datatable rows is filled then i want to write range to an excel file.

This is what i want to extract from that mail:

This is how the datatable should look like after:

And then write range that datatable to an excel file.

So my question is… how do i get the specified values? I dont know what pattern i should use.

Thank you.

You will have to find specific patterns by seeing multiple emails like the one you have shared above if you can see in signature you can easily get Telephone, mobile email and website from string manipulations on body of email. You are already getting from email address

1 Like

Lets say that ONLY the body will change of the email. The signature is and will always be the same place of the email (at the bottom). How do we manipulate that?

Hi,

There should be a way to split the email into an array of strings. For example you could use a " " character to split. Because you know who the email has come from (mail.sender) you could build some manipulation of the email address (assuming its firstname.lastname@company) and then find the name in the body of the email. Once you have the position of the name, you have located the signature and can assume that the following info is phone numbers/websites etc. There are some regex expressions you can use to identify the email addresses and phone numbers, however I’m still learning regex myself so can’t help you out with that I’m afraid!

Thank you for your input!

I can extract the name of the sender and the email with: mail.From. But thats its.

Yeah, i researched regex too but it is very difficult to learn in like few days… it will probably take much longer to learn the syntax.

I just hope there is another way than regex (for now) to manipulate the body of the email to retrieve the desired information.

Outlook pst extractor is a simple application .This software is a multifunctional programme .This is very simple interface and easy to operate.MS Outlook Attachment Extractor Software to Extract Adobe PDF, Word DOC/DOCX, Excel XLS/XLSX and other documents quickly.This software is capable to extract pst data file attachments.This tool is highly compatible with all the latest version. https://www.softakensoftware.com/outlook-attachment-extractor.html