Class

AddressBookGroup


Warning

This item was deprecated in version 2019r2. There is no replacement.

Description

Manages an Address Book group.

Properties

Name

Type

Read-Only

Shared

CreationDate

Date

ModificationDate

Date

Name

String

UniqueID

String

Methods

Name

Parameters

Returns

Shared

Add

Record As AddressBookRecord

Contacts

AddressBookContact

Groups

AddressBookGroup

Remove

Record As AddressBookRecord

RemoveValue

PropertyName As String

Value

PropertyName As String

Variant

Property descriptions


AddressBookGroup.CreationDate

CreationDate As Date

Returns the creation date of the record.


AddressBookGroup.ModificationDate

ModificationDate As Date

Returns the last modification date of the record.


AddressBookGroup.Name

Name As String


AddressBookGroup.UniqueID

UniqueID As String

Returns the unique ID corresponding to the record.

Method descriptions


AddressBookGroup.Add

Add(Record As AddressBookRecord)

Adds the record or group to the Address Book.

If Record is a group, it adds it as a subgroup. If it is a contact, it adds it as a member of the group.


AddressBookGroup.Contacts

Contacts As AddressBookContact

Returns an AddressBookContact array of people in the group.


AddressBookGroup.Groups

Groups As AddressBookGroup

Returns an AddressBookGroup array of subgroups in the group.


AddressBookGroup.Remove

Remove(Record As AddressBookRecord)

Removes the passed record, whether it is a contact or a subgroup.


AddressBookGroup.RemoveValue

RemoveValue(PropertyName As String)

Removes the value for the specified property.


AddressBookGroup.Value

Value(PropertyName As String) As Variant

Sets the value for the specified property as a Variant.

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

Compatibility

All project types on all supported operating systems.