AddressBookContact

From Xojo Documentation

Class (inherits from AddressBookRecord)


Holds a Contact record in a macOS Address Book.

Properties
AIMScreenNames HomePage ModificationDate
Addresses ICQNumbers Note
Birthday JabberScreenNames PhoneNumbers
CompanyName JobTitle UniqueID
CreationDate LastName VCard
EmailAddresses MSNScreenNames YahooScreenNames
FirstName MiddleName
Constructors

Constructor(vcard as String)


Notes

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.

Sample Code

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 myContact As AddressBookContact
book = System.AddressBook
myContact = book.CurrentUser
For i As Integer =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 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.