FilterSetItemType()

Filters items according to a specified item type.

Token ID

AFTKN_FILTER_SET_ITEMTYPE or 728

Syntax

VOID FilterSetItemType(ENUM FilterHandleType; 
                        ENUM ItemType; 
                        ENUM BitOn)

Parameters

FilterHandleType As ENUM

Unique filter identifier, returned by FilterCreate():

  • 315 Default
ItemType As ENUM

Item type to filter, or not filter, depending on the BitOn setting. Use multiple commands to filter more than one item type. Item types include:

274

Appointment

276

Mail

278

Note

8

Phone

505

Profile

506

Search

277

Task

BitOn As ENUM

Specifies how to filter the item type, as follows:

147

DontCare

0

No

Filters out the specified item type.

1

Yes

Passes the specified item type through the filter, but no others.

Example

The following example allows Appointment! and Task! items to pass through a Mailbox filter:

hFilter = FilterCreate(Inbox!) 
FilterSetItemType(Handle: hFilter; ItemType: Appointment!; BitOn: Yes!) 
FilterSetItemType(Handle: hFilter; ItemType: Task!; BitOn: Yes!) 
FilterApply(Handle: hFilter; ApplyTo: ItemList!) 
FilterDelete(Handle: hFilter)