-- Warning: it is wise to export a copy of the AddressBook (File/Export) before using this script
tell application "Address Book"
set thePerson to get selection as list
repeat with i from 1 to count thePerson
set theFirstname to ""
set theLastname to ""
set theJobtitle to ""
set theOrganization to ""
set theEmails to {}
set thePhones to {}
set theURLS to {}
set theAddresses to {}
set theFirstname to (first name of item i of thePerson)
set theLastname to (last name of item i of thePerson)
set theJobtitle to (job title of item i of thePerson)
set theOrganization to (organization of item i of thePerson)
repeat with theRef in (get every email of item i of thePerson)
set end of theEmails to {label, value} of theRef
end repeat
repeat with theRef in (get every phone of item i of thePerson)
set end of thePhones to {label, value} of theRef
end repeat
repeat with theRef in (get every url of item i of thePerson)
set end of theURLS to {label, value} of theRef
end repeat
repeat with theRef in (get every address of item i of thePerson)
set end of theAddresses to {label, street, city, state, zip, country} of theRef
end repeat
set theNote to (note of item i of thePerson)
-- convert list to text
set old_delim to AppleScript's text item delimiters
set AppleScript's text item delimiters to " "
set theEmails to theEmails as text
set thePhones to thePhones as text
set theURLS to theURLS as text
set theAddresses to theAddresses as text
set AppleScript's text item delimiters to old_delim
tell application "TextEdit"
activate
set E to make new document at end of documents with properties {name:"AB Contact"}
tell E
set its text to ("AddressBook Contact" & return & return & return & ¬
"Name " & theFirstname & " " & theLastname & return & ¬
"Company " & theOrganization & return & return & ¬
"Address " & theAddresses & return & return & ¬
"Website " & theURLS & return & ¬
"Email " & theEmails & return & return & ¬
"Phone " & thePhones & return & return & ¬
"Note " & theNote & return) as text
repeat with k in {"Name", "Company", "Address", "Website", "Email", "Phone", "Note"}
set (the color of every word where it is k) to {38000, 38000, 38000}
end repeat
set (the word of every word where it is "missing") to ""
set (the word of every word where it is "value") to ""
set the font to "Helvetica"
set the size to 14
set the font of paragraph 1 to "Helvetica Bold"
repeat with l in {"work", "home", "main", "fax", "mobile"}
set (the font of every word where it is l) to "Helvetica Italic"
end repeat
end tell
print document "AB Contact"
close document "AB Contact" saving no
end tell
end repeat
end tell