AddressListIsInSection()

Lets you determine if an address already exists in a specified address list. Returns the number of addresses in a section (such as To, CC, BC lists), of a list. Not recordable.

Token ID

AFTKN_AL_IS_IN_SECTION or 710

Syntax

BOOLEAN AddressListIsInSection(DWORD Handle; 
                                WORD Index; 
                                ENUM Section; 
                                ENUM FromWhichList)
 

Parameters

Handle As DWORD

Address list handle, returned by AddressListCreate or AddressListCreateFromGroup.

Index As WORD

Address index. The first address is 0, the second is 1, and so forth. If the index is out of range, a run-time error occurs.

Section As ENUM

The section to search in, as follows:

159

ExternalAddess!

3

PersonalGroups!

2

PublicGroups!

1

Resources!

0

Users!

FromWhichList As ENUM

Address list to apply Index to:

124

BCList!

132

CCList!

137

Combined!

Concatenates TO, CC, and BC, respectively.

233

ToList!

Return Values

BOOLEAN. If the address found at AddressIndex is in section, then return True, otherwise return False.

Remarks

If FromWhichList is combined or not provided, then use the address found at Index.The Combined list is a combination of To, CC, and BC addresses (in that order).

Index is zero-based, meaning the first address in the list has an index of 0 and the last item has an index of AddressListGetCount(Combined)1.

For example if AddressListGetCount is equal to an index of 10 items, the first item index is 0 and last item index is 9. In this example, if the address is between 0 and 9 then return True, otherwise if it is out of that range, return False. Possible scenarios include:

Combined or not provided (Combined includes To, CC, and BC)

Last Item = AddressListGetCount(Combined) - 1

To List

Last Item = AddressListGetCount(ToList) - 1

CcList

Last Item = AddressListGetCount(CcList) - 1

BcList

Last Item = AddressListGetCount(BcList) - 1