Extract xml file data from outlook email (1 Viewer)

Derek

Registered User.
Local time
Today, 01:33
Joined
May 4, 2010
Messages
234
Hi guys ,

I have recently made an outlook script working to extract data from email body to .txt file . For that one the email body contents were in structured format .

Just wonderingcan we extract data from the outlook emails that has a HTML table in the email and a XML file that’s sent to the designated mailbox. The mailbox will need to be managed but is there an a way we could to do some sort of extract with the XML file?"

Any help will be much appreciated .

thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:33
Joined
Oct 29, 2018
Messages
21,357
So, I think you are saying you have code to read the body of the email, but now you want to retrieve a file attached to the email. Is that correct?
 

Derek

Registered User.
Local time
Today, 01:33
Joined
May 4, 2010
Messages
234
I got the code to extract data from the email which has structured format but how can we extract data from xml file format ??
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:33
Joined
Oct 29, 2018
Messages
21,357
I got the code to extract data from the email which has structured format but how can we extract data from xml file format ??
Hi. Is the xml data in a file or an email body? If in a file, you could try the ImportXML method.
 

Derek

Registered User.
Local time
Today, 01:33
Joined
May 4, 2010
Messages
234
I’m not sure if xml data in a file or email body yet. How do we use importXML method ? Can this be used in outlook ? Can you give me some examples if you got ?
Thanks
 

Derek

Registered User.
Local time
Today, 01:33
Joined
May 4, 2010
Messages
234
Thanks . How this can be used in a macro so it will scroll through the emails in a dedicated folder and extract xml data from the email to a .txt file or excel spreadsheet ?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:33
Joined
Oct 29, 2018
Messages
21,357
Thanks . How this can be used in a macro so it will scroll through the emails in a dedicated folder and extract xml data from the email to a .txt file or excel spreadsheet ?
I suppose you could loop through all the email and call the method in each iteration. Does you current code go through a bunch of email in a folder now? If so, it shouldn't be any different from it. Just, instead of reading the body of the email, you extract the attachment and import the data.
 

Users who are viewing this thread

Top Bottom