Address Book To CSV
This script outputs the people in the Address Book.app to a CSV file which is designed to be imported by the Mozilla Thunderbird email program.
right click here to save to disk
updated on 11/09/2008
- Steve McMillen has contributed a modified version of this script that will allow the user to specify what groups to export. right click here to save the Groups version. Thanks Steve!
updated on 06/15/2007
- When transferring to new site and blogging software the posting date of the first 5 comments below got lost, sorry.

Thanks !
Still amazed that thunderbird can’t import from address book
I thought I’d let you know that I’ve taken the liberty of modifying your script slightly so that it catches more of the fields in Apple’s Address Book and starts Thunderbird on an import operation (I couldn’t figure out how to get the UI scripting to complete things without user intervention, however). If you want to take a look, I’ve posted my version at http://www.digital-orrery.com/software/abook2thunderbird/. I’ve credited you in the script as the original author, and have also linked back to this page… If you’d like more credit (or don’t want me to put this out there), just let me know.
Thanks for the great utility. Here’s hoping that Thunderbird eventually hooks directly into the address book!
Nathan, your link goes to a place holder site. Any chance you could repost?
my problem is that something is contaminating the sync of Address Book on OS 10.4 to my Pocket PC using mark/space missing sync software. It suddenly dawned on me to try syncing with just a few contacts names. bingo works. Now I have to figure out which of the 2000 contacts are bad. BUT, since Address Book doesn’t do export, I found this apple script above. I was going to try it but figured Nathan’s version with more info would be worth it. However, when i go to that link, I can find it. So, like Rob above, is there a way to republish the link to the revised scrpt. thanx.
Peter, Unfortunately I do not have the version that Nathan created or an updated link to it. It looks like the domain Nathan used is pointing to a generic web search engine. Sorry I could not be of more help.
Thank you very much, it works perfectly and it helped me a lot!
I had a problem with the import, as my notes fields often contained cut-and-pastes from web sites and emails with carriage returns in them. The T-bird parser would choke on those, so for a quick-and-dirty, I just dropped the notes field.
Hello, first thing i am spain. I dont speak good english. I only like say a one thing. Thanks thanks thanks. by your applescript. Bye Pablokdc http://www.flickr.com/photos/pablokdc/
Worked like a charm. Thank you so much.
did anyone ever find nathan’s script?
sorry about the repeat posts… that was not supposed to happen
Angelo,
No problem with the multiple submissions, I removed them. As for Nathan’s script I still have not found it or been contacted by him.
I love your script, I modified it though, and just thought I’d share my version with you.. it’s on my website: http://www.scoundrel.ca/
Derek,
Thanks for the link, your version looks good. I no longer use Thunderbird so I did not test the import of the generated CSV but it looks nice.
5 stars. Worked perfectly.
Any way you can teach a non-programmer how to use this script? Thanks. Eddie
Edward, The easiest way is to use this version I just uploaded that can be run like any application.
Just download the file unzip it and double click the AddressBookToCSV application.
A new TextEdit document will be created and filled in with addresses, once the addresses are no longer being added save the addresses.csv file.
Now open up Thunderbird and import the addresses.csv file into Thunderbird’s address book.
Hope that helps
Thanks… this script did what i needed!
I tried your Address Book to csv script under OS-X 10.3. However I could not save in .csv format, since TextEdit would allow only Word and Rich-Edit format.
Puzzled! What am I missing?
I am not a long-time Mac user.
I had my sister buy a Mac in late 2004 and I help her regularly.
Gilles,
After you run the script and it opens up in TextEdit you need to make sure TextEdit is in Plain Text Mode. To do this ( this is on OS X 10.4.x, I do not remember if it is the same on 10.3.x) go to the Format menu of TextEdit and click on the menu item titled ‘Make Plain Text’. Now when you save the file remove the .txt extension and replace with .csv.
Just wanted to say thanks for scripting this. It was exactly what I was looking for.
Thanks for this script. It’s very handy.
I suceeded in the end with an export via Entourage into .vcf, i send all the .vcf files to my email-account, saved the .vcf-files and imported them into thunderbird with this extension (https://nic-nac-project.de/~kaosmos/morecols-en.html). In the end this was the first thing working properly for me. Although not very Mac-like
Is there any way to manipulate the script so it will only export one particular “Group” from within address book?
Mike,
Around these lines:
#repeat with i from 1 to count of people
#
# set thisPerson to person i
You can check ‘name’ property of the ‘groups’ element of thisPerson against a string with the group you want and if not the correct group skip to the next iteration of the repeat loop.
Hope that helps
Thanks so much! This was extremely helpful. I tried a million other things and wish I would have found this simple solution an hour ago. Thanks again!
I also want to export just one “group”.
I don’t know much about scripts.
Can you explain this from your previous post?
You wrote:
Around these lines:
#repeat with i from 1 to count of people
#
# set thisPerson to person i
You can check ‘name’ property of the ‘groups’ element of thisPerson against a string with the group you want and if not the correct group skip to the next iteration of the repeat loop.
Hope that helps
I’m not exactly sure what to do with that information. Thanks!
Buehler? Buehler? : )
Tim,
Since you are bored, you can click on some of my ad banners or do a Google search or two
Seriously, I have been busy and just have not got around to making the script do what you want.
I may be slow but I don’t forget.
You can get a version of Thunderbird 2.x for Mac OS that supports Apple AddressBook natively;
http://forums.mozillazine.org/viewtopic.php?p=3003235
I modified the above script to 1) loop thru all groups and save each to a separate file and 2) write to file using shell script. The later was because if you have large address books it can take a long time to import and if you are not careful you can mess up the “front” window in TextEdit and cause the output to go the wrong window.
But I can’t seem to post my changes nor find contact info for Sean. Can you let me know how I might go about contributing back the changes?
p.s. Love the previous post; I’ve tried TBird 3.0 with its direct link to Address Book but I really need to stick with 2.x until 3.0 is out and a few add-ons are ported to it.
Cheers!
Steve
Steve,
Your version is now linked in the main post. Thank you for the modified version.
@Mike Mowery & Tim Hannig: The version that Steve wrote will do what you want.
Sean