Bulk change Address Book contacts?

Does anyone know if there is an Automator action somewhere which will allow you to bulk change any of the address book contact details?

Thanks!

MacBook, 1.83 Ghz, 2 GB RAM, Mac OS X (10.5.3)

Posted on Jun 15, 2008 10:06 AM

Reply
12 replies

Jun 15, 2008 11:13 AM in response to Adam Williamson

sorry, i was being daft. I checked and it seems that there is no separate prefix field in the address book even though there is a suffix field (but that will show up after the name). i find that decidedly odd but there it is. therefore one would stick a prefix by changing the first name. this is not elegant but i don't see what else is there to do.

the following apple script will add "Mr. " to the first name of every selected person. paste it into Script editor and save it as an application or just run it from script editor.

<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
tell application "Address Book"
set mlist to selection
repeat with cper in mlist
set fname to first name of cper
set first name of cper to "Mr." & fname
end repeat
end tell
</pre>

Jun 15, 2008 11:47 AM in response to Barney-15E

Ok, here is a better script. It asks for the prefix you want to apply.:
tell application "Address Book"
set myTitle to text returned of (display dialog "Enter a prefix to apply:" default answer "Mr." buttons {"Cancel", "Apply"})
set mlist to selection
repeat with cper in mlist
set title of cper to myTitle
end repeat
save addressbook
end tell


Also, if you have trouble when you cmd+click to select multiple items and get half way through the list and mess up the selection, you can make a group, move the contacts into the group, select all in the group, and then run the script.

Aug 11, 2009 4:39 AM in response to Adam Williamson

Sorry for the random addition to this thread. I want to remove the "(0)" prefix on phone numbers as when it syncs across to my iPhone (via Spanning Sync through Google Apps) it adds the zero.

I then have to manually edit each number before I can dial out. And I have lots of contacts.

Any suggestions? I am a relative novice when it comes to Script so please be gentle with me.

Many thanks, Paul

Aug 29, 2009 2:20 PM in response to Barney-15E

Barney or anyone else that can help,

Is there any way to rework that script to make it change words in the Address Book Note field? I want to change the spelling of a bunch of different words on a bunch of cards so I want to make a script that will change one spelling to another spelling and then do it again with a different pair of words.

Any help you can give me would be much appreciated because I am getting very tired of making changes manually on each card as I have more than 5,000 cards in my Address Book database.

Thanks again,
..michael..

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Bulk change Address Book contacts?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.