Extract email addresses from user a created gmail folder

I have access via Outlook 2013 as well as online.  I need a way to extract all email addresses found in a particular Gmail folder.

Assistance in finding a free option that does NOT allow for someone to harvest my email addresses is greatly appreciated.
frugalmuleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KimputerCommented:
You can use Outlook VBA to go through all the messages in a folder. Is the gmail folder already in your Outlook?
0
frugalmuleAuthor Commented:
Can you post a specific solution?
0
KimputerCommented:
Yes, but it's easier if you answer the question. Gmail already in Outlook? Is it a PST file, or a IMAP folder?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

frugalmuleAuthor Commented:
Imap folder that I created for filtering
0
frugalmuleAuthor Commented:
I have access from outlook or web
0
KimputerCommented:
Here's some code to get it into Excel (where you can use the Remove Duplicates function later).
It works by first selecting the folder. Then everything is automatic (computer might freeze for several minutes, depending on the amount of messages).

Sub pickfolder()

Dim NS As Outlook.NameSpace
   Set NS = Application.GetNamespace("MAPI")
   
Set pickedfolder = NS.pickfolder

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True

Set xlBook = xlApp.Workbooks.Add

Set xlSheet = xlBook.Worksheets("Sheet1")


counter = 1
For Each Item In pickedfolder.Items
    If Item.SenderEmailType = "SMTP" Then
        xlSheet.Cells(counter, 1).Value = Item.SenderEmailAddress
        counter = counter + 1
    End If
Next

End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
frugalmuleAuthor Commented:
Thanks for your code.  Here are the steps I took to use it.  No luck so far.

http://screencast.com/t/SMpwcN0Lqxtn
0
KimputerCommented:
Sorry I wasn't clear. The code is for Outlook (again use ALT+F11, use the code in ThisOutlookSession). No need to open Excel (it opens by itself).
0
frugalmuleAuthor Commented:
Ok, getting closer.  I input the code into outlook.

1) How do I run it?
2) How do I tell what the final count is for messages in that folder?  I want to make sure before I run the macro that the total number of messages in that imap folder have been downloaded.  I can see that number in Gmail from the website, but not from within Outlook.

Thank you again for your help.  Please advise further.
0
frugalmuleAuthor Commented:
I do not see how to run the code in Outlook 2013
0
KimputerCommented:
This code can be run, when you are with your cursor in the code, with F5. Or anywhere else in Outlook with ALT+F8.
If you can't see all the emails  in your Outlook folder, it's already a wrong start. It's meant to be run on a folder where you can already see all the emails (and the messages you click on open immediately).
If that's not the case, create a local pst file, and copy all the Gmail messages there first, then run the code and select that local folder.
0
frugalmuleAuthor Commented:
I'm lost.  This site needs a chat feature.
0
KimputerCommented:
Tell exactly what you did and what happened?
Did you copy & paste the code in the VB Editior (ALT+F11) in Outlook then F5 (after you click somewhere in the code, so the cursor is blinking within that code)? Do you get the screen to browse to a folder. What happens after you click on the folder?
0
frugalmuleAuthor Commented:
Got it.  Is it extracting from body and cc also?
0
KimputerCommented:
No, that requires a lot more coding. If you really need it, I can do that later.
0
frugalmuleAuthor Commented:
Great stuff, thank you.

If there is anything you can do to make it extract from CC and from the body would be greatly appreciated  http://www.codeshare.io/VLR1a
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Clients

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.