I’m trying to get a table from the contacts folder
GetContactsFolder().GetTable(filter, OlItemType.olContactItem);
but I keep getting exceptions, “Condition is not valid”. I’ve tried several different filter syntaxt. I want to do a LIKE query. The following filter works
[Email1Address] = ‘something@domain.com’
but none of these work
[Email1Address] LIKE ‘%something%’
[Email1Address] LIKE ‘* something *’
[Email1Address] LIKE ‘#something#’
[Email1Address] LIKE ‘?something?’
If I use outlook to setup view filters, it produces LIKE statements using % but for some reason it doesn’t work for me.
Ideas?
What a shame that no one could answer this. The answer is because
Need to use DASL syntaxt BUT, need to prefix it with @SQL=
string filter=”@SQL=\”http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/8084001f” LIKE ‘%something%’\””;