PDA

View Full Version : Can Country Code Be Removed From Contacts App on Macbook?




zumandrew
Mar 2, 2013, 07:40 PM
Hello,

First time poster, longtime reader.

Is there a way to remove the country field from the Contacts app? Instead of deleting each United States of America one contact at a time (2k+) perhaps an Apple script can resolve this issue? Or is there another automated way?

Thanks for your help in advance!

Cheers,

Andrew



kryten2
Mar 3, 2013, 02:42 PM
Is there a way to remove the country field from the Contacts app?
I'm guessing you mean Address Book. Try this :

-- USE THIS AT YOUR OWN RISK! MAKE A BACKUP BEFORE YOU APPLY IT TO YOUR ADDRESS BOOK!!!
tell application "Address Book"
set my_selections to selection
repeat with my_selection in my_selections
repeat with i from 1 to count of every address of my_selection
if country of address i of my_selection = "United States of America" then
set country of address i of my_selection to ""
end if
end repeat
end repeat
save
end tell


Note : Before you run this make a BACKUP of your address book. Select all persons you want to remove the country field from and run the script.