#1
|
|||
|
|||
How do I extract all my email addresses into one file?
When I'm exporting my contact list from outlook.com into csv file there's only one contact. I click people tab, then manage and then "export for outlook and other services". The downloaded file contains only one contact as well as whole "people" tab. (same with the option: "export for outlook 2010 and 2013") But I have hundreds emails in my inbox. How do I extract all my email addresses into one file? Please advice. |
#2
|
||||
|
||||
Outlook.com is a web based e-mail application, unfortunately named to clash with the Outlook application that is part of Office. Just because you have hundreds of e-mails in your inbox, it doesn't follow that the corresponding senders will be listed in the Outlook.com address book.
If you were to access Outlook.com from the Outlook (part of Office) application, you may be able to process the e-mail messages to extract the sender details, but it would require a process to be created in VBA.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thanks gmayor. It was a hotmail first, then they transited it to outlook.com. I have desktop Outlook 2013 (the one part of the Office).
I checked contacts - there's only one as well. Is there an instruction how to do it vi VBA? |
#4
|
||||
|
||||
Based largely on Sue Mosher's code at http://www.outlookcode.com/d/code/autoaddrecip.htm, the following macro will add the sender's of each e-mail in the selected Outlook folder to the Outlook contacts list.
Although aimed at Word, the VBA editor in Outlook is virtually identical to that shown in the tutorial at http://www.gmayor.com/installing_macro.htm Code:
Option Explicit Sub AddFolderToContacts() Dim olFolder As Folder Dim olExpl As Explorer Dim olItem As MailItem Set olExpl = ActiveExplorer If Not olExpl Is Nothing Then Set olFolder = olExpl.CurrentFolder For Each olItem In olFolder.Items MsgBox olItem.Sender AddEmailToContacts olItem Next olItem End If lbl_Exit: Set olItem = Nothing Set olExpl = Nothing Set olFolder = Nothing Exit Sub End Sub Sub AddEmailToContacts(objMail As Outlook.MailItem) Dim strFind As String Dim strAddress As String Dim objNS As Outlook.NameSpace Dim colContacts As Outlook.Items Dim objContact As Outlook.ContactItem Dim i As Integer On Error Resume Next ' get Contacts folder and its Items collection Set objNS = Application.GetNamespace("MAPI") Set colContacts = _ objNS.GetDefaultFolder(olFolderContacts).Items ' process message recipients ' check to see if the recip is already in Contacts strAddress = objMail.SenderEmailAddress For i = 1 To 3 strFind = "[Email" & i & "Address] = " & _ strAddress Set objContact = colContacts.Find(strFind) If Not objContact Is Nothing Then Exit For End If Next i ' if not, add it If objContact Is Nothing Then Set objContact = _ Application.CreateItem(olContactItem) With objContact .FullName = objMail.SenderName .Email1Address = strAddress .Save End With End If Set objContact = Nothing lbl_Exit: Set objNS = Nothing Set objContact = Nothing Set colContacts = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
extract node values from an XML file and insert into body of an email | afppaul | Outlook | 2 | 05-07-2014 08:45 AM |
need to extract email addresses from excel files | dunndealpr | Excel | 3 | 06-07-2013 08:29 AM |
Duplicate Email Addresses | lh66 | Outlook | 2 | 02-20-2011 07:32 PM |
Extract email address from field | zssteen | Excel | 1 | 06-19-2009 02:32 AM |
How Many Email Addresses Can You email at one time in Outlook | zinfandel72 | Outlook | 2 | 08-04-2008 06:39 AM |