Need to import all contacts from CC field into outlook contacts

How can I import all the emails from the outlook CC Field into my address book. Can I create a seperate Distribution list? I have over 100 emails in the cc field, which one of my employees sent out but I can't copy these emails or import these. I tried to copy all these emails into a notepad/excel but it looses the link. I can only copy the  names not the email addresses. I am sure there is a way and an expert on this board would know the answer. Please help.

Thanks in advance
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.

David LeeCommented:
Hi, wallstreetx.

I'm not clear on what you're asking.  Are you saying that you want to import all the addresses in the cc field of a single message into Outlook or do you want to import the cc field of multiple messages?  Also, you mention importing the emails.  I assume you menat the email address.  If not, then please explain.
wallstreetxAuthor Commented:

Sorry for not being clear. We usually send out emails to our clients and this job was performed by a person in my marketing department. She left and also deleted all files on her PC. Now only way I can retreive the email addresses of my clients is by copying the email addresses from a CC field of one of the emails she sent out and where I was also cc'd. Now, if I try to copy these email addresses in the cc field, they lose the link. It just shows the names not the email address i.e If I copy all email addresses from the cc field, email will be copied like "John Trevor" not "" So when I send out an email to John obviously it gets bounced back becuase there is no valid email address. Hope I made the question little more clearer.

wallstreetxAuthor Commented:
However, if I reply all, emails are correct but than I get server error saying "too many emails" I want to able to copy these email addresses and divide them into multiple batches. To do so, I need to import/copy these email addresses into excel or make a new Outlook Distribution list???
The Ultimate Tool Kit for Technolgy Solution Provi

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 for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

David LeeCommented:
How about creating a contact for each email address?  Would that work?
wallstreetxAuthor Commented:
Yes, that's a possibility but that will take a while. I must have over 1000 contacts and adding each will be tedious and time consuming. There's got be a way to copy all email addresses or import all email addresses into outlook distribution list or a new contact.
David LeeCommented:
Sorry, I wasn't clear.  I was asking if it'd be okay for a scripted solution to create a contact for each email address it extracts as opposed to entering them in a spreadsheet or distribution list.
wallstreetxAuthor Commented:
need the script to do that
David LeeCommented:
I was waiting for you to respond and let me know that the approach I proposed was acceptable.  Here's the code for doing this.  Follow these instructions to use set up and use this.

1.  Open Outlook.
2.  Click Tools->Macro->Visual Basic Editor.  You should now be looking at the code editor.
3.  If it's not already expanded, expand Modules.  Then click on Module1.
4.  Copy the code below and paste it into the code window.
5.  Close the code window.
6.  Check that the macro appears.  Click Tools->Macro->Macros.  Make sure that AutoAddContact appears in the list of available macros.
7.  Go to the folder containing the messages you want to make contacts for.
8.  Select all the messages you want to turn into contacts.
9.  Click Tools->Macro->Macros, select AutoAddContact, and click Run.
10.  A dialog-box will pop up saying that an application is trying to access your email and asking for permission to allow it to do so.  Check "Allow access for" and change the time to 5 minutes (that should be long enough to process even a large number of selected messages).  The macro will now loop through the selected messages and make a contact item for each one that doesn't already exist.  Remember that the only relevant contact item fields that it can fill in are the FullName and EmailAddress, the only contact related fields in an email.

As requested, this version only adds the addresses from the CC line of the selected messages.  I can change that if you want.
Sub AutoAddContact()
    Dim olkContacts As MAPIFolder, _
        olkContact As ContactItem, _
        olkSelected As Selection, _
        olkItem As Object, _
        olkRecip As Recipient, _
        strAddress As String
    Set olkSelected = Application.ActiveExplorer.Selection
    If olkSelected.Count > 0 Then
        For Each olkItem In olkSelected
            If olkItem.Class = olMail Then
                Set olkContacts = Application.Session.GetDefaultFolder(olFolderContacts)
                For Each olkRecip In olkItem.Recipients
                    If olkRecip.Type = olCC Then
                        Set olkContact = olkContacts.Items.Find("[FullName] = " & Chr(34) & olkRecip.Name & Chr(34))
                        If TypeName(olkContact) = "Nothing" Then
                            Set olkContact = Application.CreateItem(olContactItem)
                            Set objReply = olkItem.Reply
                            Set olkRecip = objReply.Recipients.Item(1)
                            If Err = 0 Then
                                strAddress = olkRecip.Address
                                If strAddress = "" Then
                                    strAddress = olkRecip.Name
                                End If
                            End If
                            With olkContact
                                .Email1Address = strAddress
                                .FullName = olkItem.SenderName
                                .Body = "Record created automatically on " & Date & " at " & Time & " by BlueDevilFan's script."
                            End With
                        End If
                    End If
            End If
    End If
    Set olkContact = Nothing
    Set olkContacts = Nothing
    Set olkSelected = Nothing
    Set olkItem = Nothing
    Set objReply = Nothing
    Set olkRecip = Nothing
End Sub

Open in new window


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
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 Software

From novice to tech pro — start learning today.