Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pad07

macrumors regular
Original poster
Jul 29, 2007
123
0
Anyone know if it's possible to remove all home address and company fields in Address Book using Applescript?

Thanks in advance for any help!
 
Anyone know if it's possible to remove all home address and company fields in Address Book using Applescript?

Off the top of my head:

Code:
tell application "Address Book"
	tell every person
		set company to false
		delete (every address whose label = "home")
	end tell
	save addressbook
end tell

Untested, so you'll need to run it to see if it actually works. (Backup your address book's contents first, of course.)
 
Off the top of my head:

Code:
tell application "Address Book"
	tell every person
		set company to false
		delete (every address whose label = "home")
	end tell
	save addressbook
end tell

Untested, so you'll need to run it to see if it actually works. (Backup your address book's contents first, of course.)

Thank you!

This works for deleting addresses, but not for clearing the Company field.

Any ideas for that?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.