get information from emails. (1 Viewer)

zezo2021

Member
Local time
Tomorrow, 00:04
Joined
Mar 25, 2021
Messages
381
Hello friends
did anyone have a free solution to extract data from Hotmail, Gmail, Yahoo, etc to access
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 22:04
Joined
Jul 9, 2003
Messages
16,245
anyone have a free solution to extract data from Hotmail, Gmail, Yahoo, etc to access

I think your best approach would be to bring all of the emails into one email provider, and it makes a lot of sense to bring all the emails into Outlook, seeing as Outlook is programmable with VBA, the same language as MS Access uses. If it is possible to get all the emails in to Outlook, then a quick search showed me that it's possible to extract data from an Outlook email and show the data in an Excel spreadsheet.

See this article here:-

How to Parse Outlook Emails and Show in Excel Worksheet using VBA​


The fact that it is possible to place the data into an Excel spreadsheet with VBA indicates to me that it should be a relatively simple step to place the data into an MS Access table.
 

conception_native_0123

Well-known member
Local time
Today, 17:04
Joined
Mar 13, 2021
Messages
1,826
if you can get them all into gmail, the following answer from google will serve you well also:

 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:04
Joined
Oct 29, 2018
Messages
21,358
I agree, if you can set up Outlook as an email client for those email services, you should be able to use Access to pull the information into a table.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:04
Joined
Aug 30, 2003
Messages
36,118
I agree, I do it a lot. In case it's not obvious, you can also grab the body of the email. I've had to parse out "people friendly" email bodies into data friendly formats.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 22:04
Joined
Jul 9, 2003
Messages
16,245
You would replace this code here:-

Code:
            Cells(iRows, 1) = objMail.SenderEmailAddress
            Cells(iRows, 2) = objMail.To
            Cells(iRows, 3) = objMail.Subject
            Cells(iRows, 4) = objMail.ReceivedTime

with a method of inserting the data extracted from Outlook into a table using an insert into SQL Statement like the one shown on my website here:-


Replace the references to the text boxes with references to the Outlook information something like this:-

Code:
'Change this:-
            Cells(iRows, 1) = objMail.SenderEmailAddress
            Cells(iRows, 2) = objMail.To
            Cells(iRows, 3) = objMail.Subject
            Cells(iRows, 4) = objMail.ReceivedTime

'To:-
Call fAddRec(objMail.SenderEmailAddress, objMail.To, objMail.Subject, objMail.ReceivedTime)
This is commonly called air code and may not work, it's just to point you in the right direction!

You will also need to adapt the function "fAddRec" to add data into your table.
 

Users who are viewing this thread

Top Bottom