AddressBookGroup

From Xojo Documentation

Class (inherits from AddressBookRecord)


Manages an Address Book group.

Properties
CreationDate Name
ModificationDate UniqueID
Methods
Add Groups RemoveValue
Contacts Remove Value

Sample Code

This example gets the names of the groups in the current user's Address Book and displays them in a ListBox.

Dim book As AddressBook
Dim groups() As AddressBookGroup
Dim i As Integer

book = System.AddressBook
groups = book.Groups
For i = 0 To Ubound(groups)
ListBox1.addrow groups(i).Name
Next

This code gets two Contact fields from the first group and displays them in a ListBox.

Dim book As AddressBook
Dim groups() As AddressBookGroup
Dim contacts() As AddressBookContact
Dim i As Integer

book = System.AddressBook
groups = book.Groups // get the array of groups, assume at least one group

contacts = groups(0).Contacts // get array of contacts in first group
For i = 0 To Ubound(contacts)
ListBox1.AddRow(contacts(i).CompanyName)
ListBox1.Cell(i, 1) = contacts(i).LastName
Next

See Also

AddressBook, AddressBookAddress, AddressBookContact, AddressBookData, AddressBookRecord classes.