Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several distribution lists in Outlook 2003 that I need to move to Gmail. While transferring contacts in the main folder is fairly easy—all one does is export to CSV and import—it's not as easy with the distribution lists.

I can't (don't know how to) copy the contacts from the lists to the main contact folder so they can be "normal", and the "save as" options don't include a CSV. There are several of these to do, containing maybe ~100-200 contacts altogether, so I'd like something that's not very tedious.

share|improve this question
Forgive me for the question, but does Gmail even support distribution lists? I know the Apps does, but standard Gmail? – user3463 Jan 30 '11 at 19:51
@Rand, I don't really care about the lists (though Gmail lets you dump all the contacts you import into a group), just getting all the names and addresses out. – Nick T Jan 30 '11 at 20:00
Apparently I misread your question. After that clarification, it makes more sense now. I have a feeling (based on my "lock-in" experiences with Outlook) that you're going to have to do it manually. – user3463 Jan 30 '11 at 20:02

Try this.

Add each list to the "To" field of a new email, and expand the list (if it has that expand option, which I'm hoping for).

Then add each one to your main contact list by right-clicking each one and saving as a contact. That might be less tedious than writing them out one by one.

share|improve this answer
+1 If you could expand them to a list you could copy and paste them into excel... maybe! – Alan Whitelaw Jan 30 '11 at 20:12
@Alan, not a bad idea, but (I don't have a Windows machine in front of me) it might only copy the names and not the addresses. Good idea though and worth a try. – user3463 Jan 30 '11 at 20:39
up vote 1 down vote accepted

Here's what I ended up doing, but ought to be a better way...

Save the list as a text file (open it, File, Save As..., Text File (*.txt)) and convert them to the CSV format Gmail likes with the following Python script:

import sys
import csv

for distlist in sys.argv[1:]:
    with open(distlist) as fin: 
        reader = csv.reader(fin, dialect="excel-tab")
        contacts = list(reader)

    header = ['Name','E-mail Address']

    contacts = contacts[4:] # chop off the list header

    with open(distlist + ".csv", "wb") as fout:
        writer = csv.writer(fout, quoting=csv.QUOTE_ALL)

You need to save each list as a text file, then drag and drop them all onto the script, or call it like "List 1.txt" ["List 2.txt"...]. It will dump out List 1.txt.csv, List 2.txt.csv, etc.

To keep the groups in Gmail, check the "Add imported contacts into: New group..." and type the group name in when prompted.

share|improve this answer
+1 for effort, though I'm sure there is an easier way! – Alan Whitelaw Jan 30 '11 at 22:21
Yeesh. Well it's a good effort, and you can accept your own answer :-) – user3463 Jan 30 '11 at 22:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .