I’m using the Advanced Search method to find emails with a string somewhere in the body of the email. It is working fine, except when the search term is something like “Jones and Jones” – the search string must get confused with the “and” and the LIKE business. Here is the string I pass to AdvancedSearch as the filter:
strF = “urn:schemas:httpmail:subject LIKE ‘%” & vSearchTerm & “%’ or urn:schemas:httpmail:textdescription LIKE ‘%” & vSearchTerm© & “%'”
It fails when vSearchTerm = “Jones and Jones”
Should I somehow include quotes in the variable? Or enter them in the strF string?
THANKS SO MUCH!
-
AdvancedFind (VBA / Outlook / XP)
- This topic has 4 replies, 2 voices, and was last updated 20 years, 10 months ago.
AuthorViewing 1 reply threadAuthorViewing 1 reply thread