JET | DASL | |
A DASL filter always starts with @SQL=" . (In VBA, an apostrophe can be embedded into a string by doubling it: filter = "@SQL=""…""" ). | ||
Boolean queries | [Unread] = true | "@SQL=""urn:schemas:httpmail:read"" = 0" |
Starts-with queries | Not possible | "@SQL=""urn:schemas-microsoft-com:office:office#Keywords"" ci_startswith 'Partner' " |
Method | JET Filter Support | DASL Filter Support | Comment |
application.advancedSearch | No | Yes | |
folder.getTable | Yes | Yes | |
items.find | Yes | Yes | Using query keywords ci_phrasematch or ci_startswith result in errors |
items.restrict | Yes | Yes | |
search.getTable | No | Yes | |
table.findRow | Yes | Yes | Using query keywords ci_phrasematch or ci_startswith result in errors |
table.restrict | Yes | Yes | |
view.filter | No | Yes |
option explicit sub searchInMailBodies(searchText as string) ' { dim fld as folder set fld = session.getDefaultFolder(olFolderInbox) dim DASL_query as string DASL_query = "@SQL=""urn:schemas:httpmail:textdescription"" ci_phrasematch '" & searchText & "'" dim tbl as table set tbl = fld.getTable(DASL_query) dim r as row do until tbl.endOfTable set r = tbl.GetNextRow debug.print r("Subject") loop end sub ' }