aldesa

Hello everybody,

In my VB.NET program, targeted to WM5.0 and WM6.0 devices,

I'like to create only a subset of my ContactCollection (Pocket Outlook namespace), and precisely those with the Categories field containing the string "CLIENTI".

I used the following syntax

Dim sessione As OutlookSession = New OutlookSession

Dim collezioneContatti As ContactCollection = sessione.Contacts.Items

collezioneContatti.Restrict("[Categories] = ""CLIENTI""")

but no filter applies and I see all my Contacts.

Which is the correct syntax

Thanks for any suggest

P.S. in another part of the program, for a ChooseContactDialog, the same syntax works fine !

Dim contatto As ChooseContactDialog = New ChooseContactDialog

contatto.RestrictContacts = "[Categories] = ""CLIENTI"""



Re: Smart Devices General ContactCollection.Restrict string syntax

Ilya Tumanov

Filter is applied to a collection which is returned by Restrict() and which you're ignoring. Try something like this:

Dim collezioneContattiClienti As ContactCollection = collezioneContatti.Restrict("[Categories] = ""CLIENTI""")






Re: Smart Devices General ContactCollection.Restrict string syntax

aldesa

Many thanks. I tried and it works fine.