AddressBookRecord → Object

AddressBookContact Class

Holds a Contact record in a Mac OS X Address Book.

Properties
Addresses | HomePage | MSNScreenNames
AIMScreenNames | ICQNumbers | Note
Birthday | JabberScreenNames | PhoneNumbers
CompanyName | JobTitle | VCard
EmailAddresses | LastName | YahooScreenNames
FirstName | MiddleName |

# Notes

# Constructor

Name | Parameters | Description
--- | --- | ---
Constructor | [vcard as String] | Creates an AddressBookContact; if the optional vcard is passed, populates it with the data in the vcard.

The methods of the AddressBookData class give you access to the labels, names, values, and other properties of AddressBookContact records. Use the Value method to get and set values.

# Example

This method gets the current user's email addresses. It uses the Count and Value methods of the AddressBookData class to do so

Dim Book as AddressBook
Dim i as Integer
Dim myContact as AddressBookContact
book= System.AddressBook
myContact=Book.CurrentUser
For i=0 to myContact.emailAddresses.Count-1
ListBox1.AddRow myContact.emailAddresses.Value(i)
Next

.

The following method sets the value of the FirstName field.

Dim Book as AddressBook
Dim i as Integer
Dim myContact as AddressBookContact
book= System.AddressBook
myContact=Book.CurrentUser
myContact.FirstName="Boris"
//or using AddressBookData.Value method
myContact.FirstName.Value="Boris"

# See Also

AddressBook, AddressBookAddress, AddressBookData, AddressBookGroup, AddressBookRecord classes.