MacOS – How to remove the Job Title and Company from all Address Book contacts using AppleScript

applescriptcontactsmacos

I would like to remove the Job Title and Company from every contact in my address book using AppleScript.

Any ideas?

Best Answer

Try something like:

tell application "Address Book"
    set thePeople to every person
    repeat with i from 1 to length of thePeople
        tell item i of thePeople
            set organization to missing value
            set job title to missing value
        end tell
    end repeat
    save
end tell